From 08cb80a354f055421234d7e2fd5c9f6293e53226 Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Sun, 25 Jul 2021 17:48:01 +0100 Subject: [PATCH] JAL-3854 patched SeqSeqUtils.deUniquify to not use instanceOf - seems to work --- src/jalview/analysis/SeqsetUtils.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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) -- 1.7.10.2