From 26f8448aa2e98602622538f31a4a635299c4748b Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Mon, 3 Nov 2014 10:02:27 +0000 Subject: [PATCH] JAL-1551 formatting --- src/jalview/datamodel/AlignmentAnnotation.java | 34 +++++++++++++----------- 1 file changed, 18 insertions(+), 16 deletions(-) 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) -- 1.7.10.2