JAL-2591 simplifying hidden columns usage
[jalview.git] / src / jalview / io / AnnotationFile.java
index c3e71da..2b78cb6 100755 (executable)
@@ -171,9 +171,8 @@ public class AnnotationFile
     if (cs != null && cs.hasHiddenColumns())
     {
       text.append("VIEW_HIDECOLS\t");
-      List<int[]> hc = cs.getHiddenRegions();
       boolean comma = false;
-      for (int[] r : hc)
+      for (int[] r : cs.getHiddenRegions())
       {
         if (!comma)
         {
@@ -202,8 +201,8 @@ public class AnnotationFile
       StringBuffer colours = new StringBuffer();
       StringBuffer graphLine = new StringBuffer();
       StringBuffer rowprops = new StringBuffer();
-      Hashtable<Integer, String> graphGroup = new Hashtable<Integer, String>();
-      Hashtable<Integer, Object[]> graphGroup_refs = new Hashtable<Integer, Object[]>();
+      Hashtable<Integer, String> graphGroup = new Hashtable<>();
+      Hashtable<Integer, Object[]> graphGroup_refs = new Hashtable<>();
       BitSet graphGroupSeen = new BitSet();
 
       java.awt.Color color;
@@ -748,8 +747,8 @@ public class AnnotationFile
           BufferedReader in) throws Exception
   {
     nlinesread = 0;
-    ArrayList<Object[]> combineAnnotation_calls = new ArrayList<Object[]>();
-    ArrayList<Object[]> deferredAnnotation_calls = new ArrayList<Object[]>();
+    ArrayList<Object[]> combineAnnotation_calls = new ArrayList<>();
+    ArrayList<Object[]> deferredAnnotation_calls = new ArrayList<>();
     boolean modified = false;
     String groupRef = null;
     Hashtable groupRefRows = new Hashtable();
@@ -1112,7 +1111,7 @@ public class AnnotationFile
         modified = true;
       }
       // Resolve the groupRefs
-      Hashtable<String, SequenceGroup> groupRefLookup = new Hashtable<String, SequenceGroup>();
+      Hashtable<String, SequenceGroup> groupRefLookup = new Hashtable<>();
       Enumeration en = groupRefRows.keys();
 
       while (en.hasMoreElements())