JAL-3020 small optimisation if max cache size reached features/JAL-3020attributeValuePrompting
authorgmungoc <g.m.carstairs@dundee.ac.uk>
Thu, 7 Jun 2018 08:05:11 +0000 (09:05 +0100)
committergmungoc <g.m.carstairs@dundee.ac.uk>
Thu, 7 Jun 2018 08:05:11 +0000 (09:05 +0100)
src/jalview/datamodel/features/FeatureAttributes.java

index d126402..60916ae 100644 (file)
@@ -232,6 +232,10 @@ public class FeatureAttributes
         terms = new HashSet<>();
       }
       int count = terms.size();
+      if (count >= MAX_ATT_VALS)
+      {
+        return;
+      }
       StringTokenizer st = new StringTokenizer(value, TERM_DELIMITERS);
       while (st.hasMoreTokens() && count < MAX_ATT_VALS)
       {