JAL-2759 Simplified HiddenColumns constructor after review
authorkiramt <k.mourao@dundee.ac.uk>
Mon, 15 Jan 2018 11:59:40 +0000 (11:59 +0000)
committerkiramt <k.mourao@dundee.ac.uk>
Mon, 15 Jan 2018 11:59:40 +0000 (11:59 +0000)
src/jalview/datamodel/HiddenColumns.java

index 18afa5b..d1345e3 100644 (file)
@@ -94,29 +94,7 @@ public class HiddenColumns
    */
   public HiddenColumns(HiddenColumns copy)
   {
-    try
-    {
-      LOCK.writeLock().lock();
-      numColumns = 0;
-      if (copy != null)
-      {
-        if (copy.hiddenColumns != null)
-        {
-          hiddenColumns = new ArrayList<>();
-          Iterator<int[]> it = copy.iterator();
-          while (it.hasNext())
-          {
-            int[] region = it.next();
-            hiddenColumns.add(region);
-            numColumns += region[1] - region[0] + 1;
-          }
-          cursor.resetCursor(hiddenColumns);
-        }
-      }
-    } finally
-    {
-      LOCK.writeLock().unlock();
-    }
+    this(copy, Integer.MIN_VALUE, Integer.MAX_VALUE, 0);
   }
 
   /**