From 3ec49f04ac668312e8eb3e963c52df6797fea89f Mon Sep 17 00:00:00 2001 From: James Procter Date: Mon, 27 Feb 2023 18:43:58 +0000 Subject: [PATCH] JAL-4134 fix more of the egregious SeqNode/BinaryNode casting --- src/jalview/analysis/TreeModel.java | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) 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; -- 1.7.10.2