Murtadha Hubail has uploaded this change for review. ( https://asterix-gerrit.ics.uci.edu/3430
Change subject: [NO ISSUE][OTH] Use Absolute Path in FileReference hashCode/equals ...................................................................... [NO ISSUE][OTH] Use Absolute Path in FileReference hashCode/equals - user model changes: no - storage format changes: no - interface changes: no Details: - To avoid cases where unintentional false comparison result happens due to a relative path of one FileReference starting with "/" and the other's does not, use the file absolute path in hashCode and equals. Change-Id: Idcb642b3c5396a8319dc0aaf050e8af6fca93039 --- M hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/io/FileReference.java 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb refs/changes/30/3430/1 diff --git a/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/io/FileReference.java b/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/io/FileReference.java index 4ded855..e4097ff 100644 --- a/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/io/FileReference.java +++ b/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/io/FileReference.java @@ -58,12 +58,12 @@ if (!(o instanceof FileReference)) { return false; } - return path.equals(((FileReference) o).path) && dev.equals(((FileReference) o).dev); + return file.getAbsolutePath().equals(((FileReference) o).getAbsolutePath()); } @Override public int hashCode() { - return path.hashCode(); + return file.getAbsolutePath().hashCode(); } /** -- To view, visit https://asterix-gerrit.ics.uci.edu/3430 To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings Gerrit-Project: asterixdb Gerrit-Branch: stabilization-f69489 Gerrit-MessageType: newchange Gerrit-Change-Id: Idcb642b3c5396a8319dc0aaf050e8af6fca93039 Gerrit-Change-Number: 3430 Gerrit-PatchSet: 1 Gerrit-Owner: Murtadha Hubail <mhub...@apache.org>