minor efficiency refactor
authorjprocter <jprocter@compbio.dundee.ac.uk>
Thu, 18 Aug 2011 11:02:09 +0000 (12:02 +0100)
committerjprocter <jprocter@compbio.dundee.ac.uk>
Thu, 18 Aug 2011 11:02:09 +0000 (12:02 +0100)
src/jalview/gui/SeqPanel.java

index 50ece22..968d302 100644 (file)
@@ -811,17 +811,20 @@ public class SeqPanel extends JPanel implements MouseListener,
                             .getType()))
             {
               tmpString = features[i].getDescription();
-              int startTag = tmpString.toUpperCase().indexOf("<HTML>");
+              String tmp2up=tmpString.toUpperCase();
+              int startTag = tmp2up.indexOf("<HTML>");
               if (startTag > -1)
               {
                 tmpString = tmpString.substring(startTag + 6);
+                tmp2up = tmp2up.substring(startTag+6);
               }
-              int endTag = tmpString.toUpperCase().indexOf("</BODY>");
+              int endTag = tmp2up.indexOf("</BODY>");
               if (endTag > -1)
               {
                 tmpString = tmpString.substring(0, endTag);
+                tmp2up = tmp2up.substring(0, endTag);
               }
-              endTag = tmpString.toUpperCase().indexOf("</HTML>");
+              endTag = tmp2up.indexOf("</HTML>");
               if (endTag > -1)
               {
                 tmpString = tmpString.substring(0, endTag);