diff options
author | bd-912 <bdunahu@colostate.edu> | 2024-05-10 13:37:18 -0600 |
---|---|---|
committer | bd-912 <bdunahu@colostate.edu> | 2024-05-10 13:37:18 -0600 |
commit | 758fdf5a3d6508fdd826476ac638614f9aac394e (patch) | |
tree | 7420bfea4cbc9eb287133c6a6a17b08909e61876 /st/ClassInstance.java | |
parent | 4b50a7a2b41373cc9b1644e584886f22da312848 (diff) |
Fix introduced error with ClassInstance.equals double usage
Diffstat (limited to 'st/ClassInstance.java')
-rw-r--r-- | st/ClassInstance.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/st/ClassInstance.java b/st/ClassInstance.java index a794f96..a7a4500 100644 --- a/st/ClassInstance.java +++ b/st/ClassInstance.java @@ -16,6 +16,12 @@ public class ClassInstance extends AbstractInstance { @Override public boolean equals(Object other) { ClassInstance o; + return (other instanceof ClassInstance && + ((o = (ClassInstance) other).getName() == this.getName())); + } + + public boolean equalsOnExtend(Object other) { + ClassInstance o; if (other instanceof ClassInstance) o = (ClassInstance) other; else |