From: James Procter Date: Mon, 27 Feb 2023 18:43:58 +0000 (+0000) Subject: JAL-4134 fix more of the egregious SeqNode/BinaryNode casting X-Git-Tag: Release_2_11_3_0~15^2^2~23 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=3ec49f04ac668312e8eb3e963c52df6797fea89f;p=jalview.git JAL-4134 fix more of the egregious SeqNode/BinaryNode casting --- diff --git a/src/jalview/analysis/TreeModel.java b/src/jalview/analysis/TreeModel.java index 1725adc..dd56424 100644 --- a/src/jalview/analysis/TreeModel.java +++ b/src/jalview/analysis/TreeModel.java @@ -20,7 +20,6 @@ */ package jalview.analysis; -import jalview.bin.Cache; import jalview.datamodel.AlignmentView; import jalview.datamodel.BinaryNode; import jalview.datamodel.NodeTransformI; @@ -81,7 +80,7 @@ public class TreeModel public TreeModel(SequenceI[] seqs, AlignmentView odata, NewickFile treefile) { - this(seqs, (SequenceNode) treefile.getTree(), treefile.HasDistances(), + this(seqs, treefile.getTree(), treefile.HasDistances(), treefile.HasBootstrap(), treefile.HasRootDistance()); seqData = odata; @@ -95,7 +94,7 @@ public class TreeModel */ public TreeModel(TreeBuilder tree) { - this(tree.getSequences(), (SequenceNode) tree.getTopNode(), tree.hasDistances(), + this(tree.getSequences(), tree.getTopNode(), tree.hasDistances(), tree.hasBootstrap(), tree.hasRootDistance()); seqData = tree.getOriginalData(); } @@ -109,7 +108,7 @@ public class TreeModel * @param hasBoot * @param hasRootDist */ - public TreeModel(SequenceI[] seqs, SequenceNode root, boolean hasDist, + public TreeModel(SequenceI[] seqs, BinaryNode root, boolean hasDist, boolean hasBoot, boolean hasRootDist) { this.sequences = seqs; @@ -333,8 +332,8 @@ public class TreeModel * TODO: Identify internal nodes... if (node.isSequenceLabel()) { * leaves.addElement(node); } */ - findLeaves((SequenceNode) nd.left(), leaves); - findLeaves((SequenceNode) nd.right(), leaves); + findLeaves(nd.left(), leaves); + findLeaves(nd.right(), leaves); } return leaves;