From: Jim Procter Date: Sun, 25 Jul 2021 16:48:01 +0000 (+0100) Subject: JAL-3854 patched SeqSeqUtils.deUniquify to not use instanceOf - seems to work X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=08cb80a354f055421234d7e2fd5c9f6293e53226;p=jalview.git JAL-3854 patched SeqSeqUtils.deUniquify to not use instanceOf - seems to work --- diff --git a/src/jalview/analysis/SeqsetUtils.java b/src/jalview/analysis/SeqsetUtils.java index 61fc747..4118124 100755 --- a/src/jalview/analysis/SeqsetUtils.java +++ b/src/jalview/analysis/SeqsetUtils.java @@ -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)