minor refactoring
authorPatrick Plitzner <p.plitzner@bgbm.org>
Thu, 18 Aug 2016 10:06:39 +0000 (12:06 +0200)
committerPatrick Plitzner <p.plitzner@bgbm.org>
Thu, 18 Aug 2016 10:06:39 +0000 (12:06 +0200)
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/AbstractEntityCollectionSection.java

index 482b9455ea46ab3de5a81d718770047a79672f49..693a54028bdb1c7e4a9849418f9105eabd084cb2 100644 (file)
@@ -142,7 +142,8 @@ public abstract class AbstractEntityCollectionSection<ENTITY, ELEMENT> extends A
         * Override in subclasses if you want to have a different behaviour.
         */
        protected void setSectionTitle() {
-               if(getCollection(getEntity()) != null && getCollection(getEntity()).size() > 0){
+               Collection<ELEMENT> collection = getCollection(getEntity());
+               if(collection != null && collection.size() > 0){
                        this.setText(getTitleString() + " +");
                }else{
                        this.setText(getTitleString());