File tree Expand file tree Collapse file tree
org.modeldriven.fuml/src/main/java/fUML/Semantics/Classes/Kernel Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -118,6 +118,13 @@ public fUML.Semantics.Classes.Kernel.Value copy() {
118118 return newObject ;
119119
120120 } // copy
121+
122+ public boolean equals (Value otherValue ) {
123+ // Test if this object is equal to the otherValue.
124+ // To be equal, the otherValue must be the same object as this object.
125+
126+ return this == otherValue ;
127+ } // equals
121128
122129 protected fUML .Semantics .Classes .Kernel .Value new_ () {
123130 // Create a new object with no type, feature values or locus.
Original file line number Diff line number Diff line change @@ -61,7 +61,11 @@ public boolean equals(fUML.Semantics.Classes.Kernel.Value otherValue) {
6161
6262 boolean isEqual = false ;
6363 if (otherValue instanceof Reference ) {
64- isEqual = (((Reference ) otherValue ).referent == this .referent );
64+ if (this .referent == null ) {
65+ isEqual = ((Reference )otherValue ).referent == null ;
66+ } else {
67+ isEqual = this .referent .equals (((Reference ) otherValue ).referent );
68+ }
6569 }
6670
6771 return isEqual ;
You can’t perform that action at this time.
0 commit comments