code cleaning
authorKatja Luther <k.luther@bgbm.org>
Fri, 30 Jun 2017 09:40:22 +0000 (11:40 +0200)
committerKatja Luther <k.luther@bgbm.org>
Fri, 30 Jun 2017 09:40:22 +0000 (11:40 +0200)
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/newWizard/NewTaxonNodeWizard.java

index 5dc18d5833bdee26919576ffa90d4470a00bc7a6..f51f59d8229d6da8b6309925d1807b920f604dae 100644 (file)
@@ -108,23 +108,19 @@ public class NewTaxonNodeWizard extends AbstractNewEntityWizard<ITaxonTreeNode>{
         if(getSelection() != null){
             Object selectedObject = getSelection().getFirstElement();
             if(selectedObject instanceof ITaxonTreeNode){
-                ITaxonTreeNode treeNode = (ITaxonTreeNode) selectedObject;
-
-                if(treeNode instanceof Classification){
-                    //FIXME can this ever happen?
-                    return CdmStore.getService(IClassificationService.class).load(treeNode.getUuid());
-                }
-                else if(treeNode instanceof TaxonNode){
-                       TaxonNode node =  CdmStore.getService(ITaxonNodeService.class).load(treeNode.getUuid());
-                       if(node.getTaxon()!=null){
-                           //FIXME this taxon is not used. Do we need this call?
-                           Taxon taxon = (Taxon) CdmStore.getService(ITaxonService.class).load(node.getTaxon().getUuid());
-                       }
-                       else if(node.getClassification()!=null){
-                           return CdmStore.getService(IClassificationService.class).load(node.getClassification().getUuid());
-                       }
-                    return node;
-                }
+               ITaxonTreeNode treeNode = (ITaxonTreeNode) selectedObject;
+
+               if(treeNode instanceof TaxonNode){
+                       TaxonNode node =  CdmStore.getService(ITaxonNodeService.class).load(treeNode.getUuid());
+                       if(node.getTaxon()!=null){
+                           //FIXME this taxon is not used. Do we need this call?
+                           Taxon taxon = (Taxon) CdmStore.getService(ITaxonService.class).load(node.getTaxon().getUuid());
+                       }
+                       else if(node.getClassification()!=null){
+                           return CdmStore.getService(IClassificationService.class).load(node.getClassification().getUuid());
+                       }
+                       return node;
+               }
             }
         }