From: Jim Procter Date: Mon, 3 Nov 2014 10:02:27 +0000 (+0000) Subject: JAL-1551 formatting X-Git-Tag: Jalview_2_9~155^2~15^2~6 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=26f8448aa2e98602622538f31a4a635299c4748b;p=jalview.git JAL-1551 formatting --- diff --git a/src/jalview/datamodel/AlignmentAnnotation.java b/src/jalview/datamodel/AlignmentAnnotation.java index e0a8e6e..8d367a0 100755 --- a/src/jalview/datamodel/AlignmentAnnotation.java +++ b/src/jalview/datamodel/AlignmentAnnotation.java @@ -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)