From fac668afe0509dd43d360b921f5ba4eda8601887 Mon Sep 17 00:00:00 2001 From: gmungoc Date: Fri, 28 Aug 2015 16:31:33 +0100 Subject: [PATCH] JAL-1836 temporary workaround for negative resNumIns in PDB file --- src/jalview/ext/jmol/PDBFileWithJmol.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/jalview/ext/jmol/PDBFileWithJmol.java b/src/jalview/ext/jmol/PDBFileWithJmol.java index 3b6f0c2..240ea7b 100644 --- a/src/jalview/ext/jmol/PDBFileWithJmol.java +++ b/src/jalview/ext/jmol/PDBFileWithJmol.java @@ -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 -- 1.7.10.2