Skip to content

Commit

Permalink
Java: fixed bug that allowed LMCP objects of different types to pass …
Browse files Browse the repository at this point in the history
…equals() test
  • Loading branch information
Matt Duquette committed Jul 20, 2017
1 parent a02c348 commit 02b4952
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/templates/java/series_object_java
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,7 @@ public class -<object_type_name>- -<extends_object_type>- {
public boolean equals(Object anotherObj) {
if ( anotherObj == this ) return true;
if ( anotherObj == null ) return false;
if ( !(anotherObj instanceof -<object_type_name>-) ) return false;
if ( !super.equals(anotherObj) ) return false;
if ( anotherObj.getClass() != this.getClass() ) return false;
-<object_type_name>- o = (-<object_type_name>-) anotherObj;
-<member_equals>-
return true;
Expand Down

0 comments on commit 02b4952

Please sign in to comment.