From 02b4952433af21968d4c040c5d316e9a7acac233 Mon Sep 17 00:00:00 2001 From: Matt Duquette <> Date: Thu, 20 Jul 2017 13:10:16 -0400 Subject: [PATCH] Java: fixed bug that allowed LMCP objects of different types to pass equals() test --- src/templates/java/series_object_java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/templates/java/series_object_java b/src/templates/java/series_object_java index d6e52d7..6d6615f 100644 --- a/src/templates/java/series_object_java +++ b/src/templates/java/series_object_java @@ -88,8 +88,7 @@ public class -- -- { public boolean equals(Object anotherObj) { if ( anotherObj == this ) return true; if ( anotherObj == null ) return false; - if ( !(anotherObj instanceof --) ) return false; - if ( !super.equals(anotherObj) ) return false; + if ( anotherObj.getClass() != this.getClass() ) return false; -- o = (--) anotherObj; -- return true;