From cc381c7b1496cdee4d7ad93d0921d887f2323b0c Mon Sep 17 00:00:00 2001 From: jprocter Date: Thu, 18 Aug 2011 12:02:09 +0100 Subject: [PATCH] minor efficiency refactor --- src/jalview/gui/SeqPanel.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/jalview/gui/SeqPanel.java b/src/jalview/gui/SeqPanel.java index 50ece22..968d302 100644 --- a/src/jalview/gui/SeqPanel.java +++ b/src/jalview/gui/SeqPanel.java @@ -811,17 +811,20 @@ public class SeqPanel extends JPanel implements MouseListener, .getType())) { tmpString = features[i].getDescription(); - int startTag = tmpString.toUpperCase().indexOf(""); + String tmp2up=tmpString.toUpperCase(); + int startTag = tmp2up.indexOf(""); if (startTag > -1) { tmpString = tmpString.substring(startTag + 6); + tmp2up = tmp2up.substring(startTag+6); } - int endTag = tmpString.toUpperCase().indexOf(""); + int endTag = tmp2up.indexOf(""); if (endTag > -1) { tmpString = tmpString.substring(0, endTag); + tmp2up = tmp2up.substring(0, endTag); } - endTag = tmpString.toUpperCase().indexOf(""); + endTag = tmp2up.indexOf(""); if (endTag > -1) { tmpString = tmpString.substring(0, endTag); -- 1.7.10.2