code cleanup
authorPatrick Plitzner <p.plitzner@bgbm.org>
Fri, 14 Jul 2017 12:59:26 +0000 (14:59 +0200)
committerPatrick Plitzner <p.plitzner@bgbm.org>
Fri, 14 Jul 2017 12:59:26 +0000 (14:59 +0200)
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/model/AbstractUtility.java

index da95042cc0722a262c44401fb1527b6fdfd3db43..96d5b7485d11988040cdf1e08a31f3cb046d5bac 100644 (file)
@@ -763,22 +763,15 @@ public abstract class AbstractUtility {
         }
     }
 
-    /**
-     * @param event
-     * @return
-     */
     public static Object getElementsFromSelectionChangedEvent(SelectionChangedEvent event) {
         IStructuredSelection selection = (IStructuredSelection) event.getSelection();
-        Object selectionToSet;
+        Object selectionToSet = selection;
         if(selection.size() == 1){
             selectionToSet = selection.getFirstElement();
         }
         else if(!selection.isEmpty()){
             selectionToSet = selection.toArray();
         }
-        else{
-            selectionToSet = selection;
-        }
         return selectionToSet;
     }
 }