JAL-3854 patched SeqSeqUtils.deUniquify to not use instanceOf - seems to work
[jalview.git] / src / jalview / analysis / SeqsetUtils.java
index 61fc747..4118124 100755 (executable)
@@ -260,8 +260,7 @@ public class SeqsetUtils
     while (keys.hasMoreElements())
     {
       Object key = keys.nextElement();
-      if (key instanceof String)
-      {
+      try {
         if ((msq = matcher.findIdMatch((String) key)) != null)
         {
           Hashtable sqinfo = (Hashtable) map.get(key);
@@ -276,6 +275,11 @@ public class SeqsetUtils
                     + "' in uniquified alignment");
           }
         }
+      } catch (ClassCastException ccastex) {
+        if (!quiet)
+        {
+          System.err.println("Unexpected object in SeqSet map : "+key.getClass());
+        }
       }
     }
     if (unmatched.size() > 0 && !quiet)