Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@
* InodeTree implements a mount-table as a tree of inodes.
* It is used to implement ViewFs and ViewFileSystem.
* In order to use it the caller must subclass it and implement
* the abstract methods {@link #getTargetFileSystem(INodeDir)}, etc.
* the abstract methods {@link #getTargetFileSystem(
)}, etc.
*
* The mountable is initialized from the config variables as
* specified in {@link ViewFs}
Expand All @@ -63,7 +64,7 @@ enum ResultKind {
EXTERNAL_DIR
}

static final Path SlashPath = new Path("/");
static final Path SLASH_PATH = new Path("/");
// the root of the mount table
private final INode<T> root;
// the fallback filesystem
Expand Down Expand Up @@ -479,7 +480,7 @@ protected InodeTree(final Configuration config, final String viewName)
String settings = null;
if (src.startsWith(linkPrefix)) {
src = src.substring(linkPrefix.length());
if (src.equals(SlashPath.toString())) {
if (src.equals(SLASH_PATH.toString())) {
throw new UnsupportedFileSystemException("Unexpected mount table "
+ "link entry '" + key + "'. Use "
+ Constants.CONFIG_VIEWFS_LINK_MERGE_SLASH + " instead!");
Expand Down Expand Up @@ -634,7 +635,7 @@ ResolveResult<T> resolve(final String p, final boolean resolveLastComponent)
T targetFs = root.isInternalDir() ?
getRootDir().getInternalDirFs() : getRootLink().getTargetFileSystem();
ResolveResult<T> res = new ResolveResult<T>(ResultKind.INTERNAL_DIR,
targetFs, root.fullPath, SlashPath);
targetFs, root.fullPath, SLASH_PATH);
return res;
}

Expand Down Expand Up @@ -681,7 +682,7 @@ ResolveResult<T> resolve(final String p, final boolean resolveLastComponent)
final INodeLink<T> link = (INodeLink<T>) nextInode;
final Path remainingPath;
if (i >= path.length - 1) {
remainingPath = SlashPath;
remainingPath = SLASH_PATH;
} else {
StringBuilder remainingPathStr = new StringBuilder("/" + path[i + 1]);
for (int j = i + 2; j < path.length; ++j) {
Expand All @@ -701,7 +702,7 @@ ResolveResult<T> resolve(final String p, final boolean resolveLastComponent)
// We have resolved to an internal dir in mount table.
Path remainingPath;
if (resolveLastComponent) {
remainingPath = SlashPath;
remainingPath = SLASH_PATH;
} else {
// note we have taken care of when path is "/" above
// for internal dirs rem-path does not start with / since the lookup
Expand Down