Skip to content

Commit 3ad63db

Browse files
committed
core: Inode: Improve forFileIdKey and innerInode
Now that we have a Opaque-specific constructor, let's use it instead of converting back and forth from byte[]. Related: #149 Signed-off-by: Christian Kohlschütter <[email protected]>
1 parent 8f4c511 commit 3ad63db

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

core/src/main/java/org/dcache/nfs/vfs/Inode.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,11 +147,11 @@ public static Inode forFile(byte[] bytes) {
147147
}
148148

149149
public static Inode forFileIdKey(Opaque key) {
150-
return forFile(key.toBytes());
150+
return new Inode(0, 0, 0, key);
151151
}
152152

153153
public static Inode innerInode(Inode outerInode) {
154-
return new Inode(0, 0, 0, outerInode.getFileIdKey());
154+
return forFileIdKey(outerInode.getFileIdKey());
155155
}
156156

157157
@Deprecated(forRemoval = true)

0 commit comments

Comments
 (0)