Project

General

Profile

« Previous | Next » 

Revision 9edfe8dd

Added by Patrick Plitzner over 6 years ago

Fix potential NPE

View differences:

eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/handler/defaultHandler/DefaultOpenTaxonEditorForTaxonHandler.java
7 7
import eu.etaxonomy.cdm.api.service.ITaxonService;
8 8
import eu.etaxonomy.cdm.model.taxon.TaxonBase;
9 9
import eu.etaxonomy.taxeditor.editor.EditorUtil;
10
import eu.etaxonomy.taxeditor.editor.TaxonEditorInput;
11 10
import eu.etaxonomy.taxeditor.handler.defaultHandler.DefaultOpenHandlerBase;
12 11
import eu.etaxonomy.taxeditor.model.MessagingUtils;
13 12
import eu.etaxonomy.taxeditor.store.CdmStore;
......
22 21

  
23 22
    @Override
24 23
    protected void open(ExecutionEvent event, TaxonBase entity) {
25
        TaxonEditorInput input = TaxonEditorInput.NewInstanceFromTaxonBase(entity.getUuid());
26 24
        try {
27
            EditorUtil.open(input);
25
            EditorUtil.openTaxonBase(entity.getUuid());
28 26
        } catch (PartInitException e) {
29
            MessagingUtils.error(DefaultOpenTaxonEditorForTaxonHandler.class, "Could not open taxon editor for taxon "+input.getTaxon(), e);
27
            MessagingUtils.error(DefaultOpenTaxonEditorForTaxonHandler.class, "Could not open taxon editor for taxon/synonym "+entity, e);
30 28
        }
31 29
    }
32 30

  

Also available in: Unified diff