fix #6947: fix error for empty lsid field
[taxeditor.git] / eu.etaxonomy.taxeditor.store / src / main / java / eu / etaxonomy / taxeditor / ui / element / LsidWithExceptionLabelElement.java
index be9be32f621ad584a81b1c8c34c0bfcb52e16efc..cb8a4629fd020fd3bc71cad114f9d481c57e073f 100644 (file)
@@ -1,4 +1,3 @@
-// $Id$
 /**
 * Copyright (C) 2007 EDIT
 * European Distributed Institute of Taxonomy
@@ -18,7 +17,7 @@ import eu.etaxonomy.cdm.model.common.LSID;
  * @date Sep 21, 2015
  *
  */
-public class LsidWithExceptionLabelElement extends UriWithExceptionLabelElement<LSID> {
+public class LsidWithExceptionLabelElement extends AbstractUriWithExceptionLabelElement<LSID> {
 
     protected LsidWithExceptionLabelElement(CdmFormFactory formFactory, ICdmFormElement parentElement,
             String labelString, LSID initialObject, Integer textHeight, int style) {
@@ -39,14 +38,12 @@ public class LsidWithExceptionLabelElement extends UriWithExceptionLabelElement<
         * {@inheritDoc}
         */
        @Override
-       public LSID parseText() {
-        try {
-            updateExceptionLabel(null);
-            return new LSID(super.getText());
-        } catch (Exception e) {
-            updateExceptionLabel(e);
+       public LSID getParsedText() throws Exception {
+            String uriText = super.getText();
+            if(uriText!=null){
+                return new LSID(uriText);
+            }
             return null;
-        }
        }
 
 }