From cc1a2c3f1f3c7bc8df4851c86bc7bb42e22799c5 Mon Sep 17 00:00:00 2001 From: Piotr Gawron <piotr.gawron@uni.lu> Date: Wed, 28 Jun 2017 18:39:44 +0200 Subject: [PATCH] unnecessary casting removed --- .../lcsb/mapviewer/commands/CreateHierarchyCommand.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/model-command/src/main/java/lcsb/mapviewer/commands/CreateHierarchyCommand.java b/model-command/src/main/java/lcsb/mapviewer/commands/CreateHierarchyCommand.java index c8a57a8666..e89bcdf5a4 100644 --- a/model-command/src/main/java/lcsb/mapviewer/commands/CreateHierarchyCommand.java +++ b/model-command/src/main/java/lcsb/mapviewer/commands/CreateHierarchyCommand.java @@ -123,16 +123,16 @@ public class CreateHierarchyCommand extends ModelCommand { alias.setCompartment(null); alias.setTransparencyLevel(""); } - for (BioEntity bioEntity: getModel().getBioEntities()) { + for (BioEntity bioEntity : getModel().getBioEntities()) { bioEntity.setVisibilityLevel("0"); } - Set<PathwayCompartment> toRemove = new HashSet<>(); + Set<Compartment> toRemove = new HashSet<>(); for (Compartment alias : getModel().getCompartments()) { if (alias instanceof PathwayCompartment) { - toRemove.add((PathwayCompartment) alias); + toRemove.add(alias); } } - for (PathwayCompartment alias : toRemove) { + for (Compartment alias : toRemove) { getModel().removeElement(alias); } } -- GitLab