Add mostly-ide-generated hashCode for RootedPath
Removed null-checks since not expecting null. RootedPath's hashCode is called
enough that it's worth optimizing.
@@ -111,9 +111,14 @@ public class RootedPath implements Serializable {
@Override
public int hashCode() {
- return Objects.hash(root, rootRelativePath);
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + root.hashCode();
+ result = prime * result + rootRelativePath.hashCode();
+ return result;
}
+
@Override
public String toString() {
return "[" + root + "]/[" + rootRelativePath + "]";
