Skip to content

Commit

Permalink
Fix HtsPath equals and hashCode.
Browse files Browse the repository at this point in the history
  • Loading branch information
cmnbroad committed May 29, 2024
1 parent aa44a43 commit 8b0e589
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/main/java/htsjdk/io/HtsPath.java
Original file line number Diff line number Diff line change
Expand Up @@ -229,16 +229,13 @@ public boolean equals(Object o) {

HtsPath that = (HtsPath) o;

if (!getRawInputString().equals(that.getRawInputString())) return false;
if (!getURI().equals(that.getURI())) return false;
return true;
}

@Override
public int hashCode() {
int result = getRawInputString().hashCode();
result = 31 * result + getURI().hashCode();
return result;
return getURI().hashCode();
}

// Called during HtsPath construction to construct and return a URI for the provided input string.
Expand Down

0 comments on commit 8b0e589

Please sign in to comment.