Merge commit
[jalview.git] / src / jalview / datamodel / Mapping.java
index be8fd58..559ae4c 100644 (file)
@@ -1,6 +1,6 @@
 /*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.2)
- * Copyright (C) 2014 The Jalview Authors
+ * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
+ * Copyright (C) $$Year-Rel$$ The Jalview Authors
  * 
  * This file is part of Jalview.
  * 
@@ -348,6 +348,8 @@ public class Mapping
   @Override
   public boolean equals(Object o)
   {
+    // TODO should override Object.hashCode() to ensure that equal objects have
+    // equal hashcodes
     if (o == null || !(o instanceof Mapping))
     {
       return false;
@@ -366,7 +368,7 @@ public class Mapping
     {
       return false;
     }
-    if (map.equals(other.map))
+    if ((map == null && other.map == null) || map.equals(other.map))
     {
       return true;
     }