JAL-1836 temporary workaround for negative resNumIns in PDB file
authorgmungoc <g.m.carstairs@dundee.ac.uk>
Fri, 28 Aug 2015 15:31:33 +0000 (16:31 +0100)
committergmungoc <g.m.carstairs@dundee.ac.uk>
Fri, 28 Aug 2015 15:31:33 +0000 (16:31 +0100)
src/jalview/ext/jmol/PDBFileWithJmol.java

index 3b6f0c2..240ea7b 100644 (file)
@@ -176,8 +176,14 @@ public class PDBFileWithJmol extends AlignFile implements
                   newseq[p] = cinds[seq[p]] == nonGap ? ngc : seq[p];
                   if (secstr[p] >= 'A' && secstr[p] <= 'z')
                   {
-                    asecstr[p] = new Annotation("" + secstr[p], null,
-                            secstrcode[p], Float.NaN);
+                    try
+                    {
+                      asecstr[p] = new Annotation("" + secstr[p], null,
+                              secstrcode[p], Float.NaN);
+                    } catch (ArrayIndexOutOfBoundsException e)
+                    {
+                      // skip - patch for JAL-1836
+                    }
                   }
                 }
                 String modelTitle = (String) ms