Skip to content

Commit

Permalink
Make equals() and hashCode() final on Subject.
Browse files Browse the repository at this point in the history
Fixes google#247
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=125528464
  • Loading branch information
kluever authored and cpovirk committed Jun 22, 2016
1 parent 23d88f9 commit d6917b8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/src/main/java/com/google/common/truth/Subject.java
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ protected void failWithRawMessage(String message, Object... parameters) {
*/
@Deprecated
@Override
public boolean equals(@Nullable Object o) {
public final boolean equals(@Nullable Object o) {
throw new UnsupportedOperationException(
"If you meant to test object equality, use .isEqualTo(other) instead.");
}
Expand All @@ -372,7 +372,7 @@ public boolean equals(@Nullable Object o) {
*/
@Deprecated
@Override
public int hashCode() {
public final int hashCode() {
throw new UnsupportedOperationException("Subject.hashCode() is not supported.");
}
}

0 comments on commit d6917b8

Please sign in to comment.