CR-JAL-220 JAL-3591 fixes for unlikely key value
authorBobHanson <hansonr@stolaf.edu>
Thu, 28 May 2020 12:51:38 +0000 (07:51 -0500)
committerBobHanson <hansonr@stolaf.edu>
Thu, 28 May 2020 12:51:38 +0000 (07:51 -0500)
src/jalview/appletgui/SeqPanel.java
src/jalview/gui/JDatabaseTree.java

index 32f0abb..5570230 100644 (file)
@@ -820,8 +820,9 @@ public class SeqPanel extends Panel implements MouseMotionListener,
     {
       if (av.getAlignment().isNucleotide())
       {
-        String base = ResidueProperties.nucleotideName.get(ch);
-        text.append(" Nucleotide: ").append(base == null ? ch : base);
+        String schar = "" + ch;
+        String base = ResidueProperties.nucleotideName.get(schar);
+        text.append(" Nucleotide: ").append(base == null ? schar : base);
       }
       else
       {
index 8d62433..b05a609 100644 (file)
@@ -122,7 +122,7 @@ public class JDatabaseTree extends JalviewDialog implements KeyListener
         {
           System.err.println("dupe ig for : " + dbs[i] + " \t"
                   + dbp.getDbName() + " (" + dbp.getDbSource() + ")");
-          source.remove(tn);
+          source.remove(dbs[i]);
         }
       }
     }