JAL-1551 formatting
authorJim Procter <jprocter@dundee.ac.uk>
Mon, 3 Nov 2014 10:02:27 +0000 (10:02 +0000)
committerJim Procter <jprocter@dundee.ac.uk>
Mon, 3 Nov 2014 10:02:27 +0000 (10:02 +0000)
src/jalview/datamodel/AlignmentAnnotation.java

index e0a8e6e..8d367a0 100755 (executable)
@@ -650,9 +650,9 @@ public class AlignmentAnnotation
     {
       threshold = new GraphLine(annotation.threshold);
     }
+    Annotation[] ann = annotation.annotations;
     if (annotation.annotations != null)
     {
-      Annotation[] ann = annotation.annotations;
       this.annotations = new Annotation[ann.length];
       for (int i = 0; i < ann.length; i++)
       {
@@ -665,24 +665,26 @@ public class AlignmentAnnotation
           }
         }
       }
-      ;
-      if (annotation.sequenceRef != null)
+    }
+    if (annotation.sequenceRef != null)
+    {
+      this.sequenceRef = annotation.sequenceRef;
+      if (annotation.sequenceMapping != null)
       {
-        this.sequenceRef = annotation.sequenceRef;
-        if (annotation.sequenceMapping != null)
+        Integer p = null;
+        sequenceMapping = new Hashtable();
+        Enumeration pos = annotation.sequenceMapping.keys();
+        while (pos.hasMoreElements())
         {
-          Integer p = null;
-          sequenceMapping = new Hashtable();
-          Enumeration pos = annotation.sequenceMapping.keys();
-          while (pos.hasMoreElements())
+          // could optimise this!
+          p = (Integer) pos.nextElement();
+          Annotation a = annotation.sequenceMapping.get(p);
+          if (a == null)
+          {
+            continue;
+          }
+          if (ann != null)
           {
-            // could optimise this!
-            p = (Integer) pos.nextElement();
-            Annotation a = annotation.sequenceMapping.get(p);
-            if (a == null)
-            {
-              continue;
-            }
             for (int i = 0; i < ann.length; i++)
             {
               if (ann[i] == a)