Merge develop to Release_2_8_3_Branch
[jalview.git] / src / uk / ac / ebi / picr / model / CrossReference.java
index aef2ca9..498a47b 100644 (file)
@@ -244,15 +244,22 @@ public class CrossReference implements java.io.Serializable
 
   private java.lang.Object __equalsCalc = null;
 
+  @Override
   public synchronized boolean equals(java.lang.Object obj)
   {
+    if (obj == null)
+    {
+      return false;
+    }
     if (!(obj instanceof CrossReference))
+    {
       return false;
+    }
     CrossReference other = (CrossReference) obj;
-    if (obj == null)
-      return false;
     if (this == obj)
+    {
       return true;
+    }
     if (__equalsCalc != null)
     {
       return (__equalsCalc == obj);
@@ -285,6 +292,11 @@ public class CrossReference implements java.io.Serializable
 
   private boolean __hashCodeCalc = false;
 
+  /**
+   * hashCode designed to ensure that if two instances satisfy o1.equals(o2)
+   * then they have the same hashcode.
+   */
+  @Override
   public synchronized int hashCode()
   {
     if (__hashCodeCalc)