ref #6190 removing svn property place holder in first line of code - java files
[taxeditor.git] / eu.etaxonomy.taxeditor.store / src / main / java / eu / etaxonomy / taxeditor / ui / section / name / TypeDesignationSection.java
index d48891aa44c43070eb1a4ad766829937f3d7695f..838b6bf083f85f885333e33dbc8c30e53f2c64e3 100644 (file)
@@ -1,9 +1,8 @@
-// $Id$
 /**
 * Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy 
+* European Distributed Institute of Taxonomy
 * http://www.e-taxonomy.eu
-* 
+*
 * The contents of this file are subject to the Mozilla Public License Version 1.1
 * See LICENSE.TXT at the top of this package for the full license terms.
 */
@@ -53,7 +52,7 @@ public class TypeDesignationSection extends AbstractEntityCollectionSection<Taxo
                        ICdmFormElement parentElement, int style) {
                super(formFactory, conversation, parentElement, "Type Designations", style);
        }
-       
+
        /** {@inheritDoc} */
        @Override
        public void addElement(TypeDesignationBase element) {
@@ -104,14 +103,18 @@ public class TypeDesignationSection extends AbstractEntityCollectionSection<Taxo
         * @see eu.etaxonomy.taxeditor.section.ITaxonDetailSection#setTaxon(eu.etaxonomy.cdm.model.taxon.TaxonBase)
         */
        /** {@inheritDoc} */
-       public void setTaxonBase(TaxonBase entity) {
+       @Override
+    public void setTaxonBase(TaxonBase entity) {
                this.taxonBase = entity;
                NonViralName name = (NonViralName) HibernateProxyHelper.deproxy(entity.getName());
                setEntity(name);
        }
-       
+
        private boolean isSpecimenType(){
                Rank rank = getEntity().getRank();
+               if(rank==null){
+                       return false;
+               }
                return rank.isSpecies() || rank.isInfraSpecific();
        }