Commit db109be8 authored by Alexander Koshevoy's avatar Alexander Koshevoy
Browse files

Move two methods on the spot they were prior to the last commit; remove...

Move two methods on the spot they were prior to the last commit; remove optional final modifier of BestMappingSelector#get() method.
parent 19ad5a9f
Showing with 16 additions and 16 deletions
+16 -16
......@@ -73,21 +73,6 @@ public class PathMappingSettings extends AbstractPathMapper implements Cloneable
return norm(path);
}
@NotNull
public static String mapToLocal(String path, String remoteRoot, String localRoot) {
if (areBothEmpty(localRoot, remoteRoot)) {
return path;
}
path = norm(path);
String remotePrefix = norm(remoteRoot);
path = path.replace(remotePrefix, norm(localRoot));
return path;
}
public static boolean areBothEmpty(String localRoot, String remoteRoot) {
return StringUtil.isEmpty(localRoot) || StringUtil.isEmpty(remoteRoot);
}
@Override
public boolean isEmpty() {
return myPathMappings.isEmpty();
......@@ -105,7 +90,7 @@ public class PathMappingSettings extends AbstractPathMapper implements Cloneable
}
@Nullable
public final PathMapping get() {
public PathMapping get() {
return myBest;
}
}
......@@ -167,6 +152,21 @@ public class PathMappingSettings extends AbstractPathMapper implements Cloneable
myPathMappings = create(pathMappings);
}
@NotNull
public static String mapToLocal(String path, String remoteRoot, String localRoot) {
if (areBothEmpty(localRoot, remoteRoot)) {
return path;
}
path = norm(path);
String remotePrefix = norm(remoteRoot);
path = path.replace(remotePrefix, norm(localRoot));
return path;
}
public static boolean areBothEmpty(String localRoot, String remoteRoot) {
return StringUtil.isEmpty(localRoot) || StringUtil.isEmpty(remoteRoot);
}
@Nullable
public static PathMappingSettings readExternal(@Nullable final Element element) {
if (element == null) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment