From a17b025b4563d1832e002632a08d9909837999c8 Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Wed, 18 Oct 2017 15:28:30 +0100 Subject: [PATCH] JAL-2782 remark about possible exception due to unsafe regex --- src/ext/edu/ucsf/rbvi/strucviz2/ChimeraResidue.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/ext/edu/ucsf/rbvi/strucviz2/ChimeraResidue.java b/src/ext/edu/ucsf/rbvi/strucviz2/ChimeraResidue.java index 0045e97..3abbe75 100644 --- a/src/ext/edu/ucsf/rbvi/strucviz2/ChimeraResidue.java +++ b/src/ext/edu/ucsf/rbvi/strucviz2/ChimeraResidue.java @@ -383,6 +383,8 @@ public class ChimeraResidue implements ChimeraStructuralObject, public void splitInsertionCode(String residue) { // OK, split the index into number and insertion code + // JBPNote - m.matches() can be true even if there is no resnum - this can + // cause NumberFormatExceptions below Pattern p = Pattern.compile("(\\d*)([A-Z]?)"); Matcher m = p.matcher(residue); if (m.matches()) -- 1.7.10.2