Project

General

Profile

Revision 269e40a9

ID269e40a9858ccc51f381093a5e5587bb761ca56f
Parent df9fa40d
Child 185662d8

Added by Patrick Plitzner over 3 years ago

ref #7362 Fix potential NPE

View differences:

eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/webimport/termimport/GfBioTerminologyImportPresenter.java
175 175
            clearDetails();
176 176
        }
177 177
        OntologyTermWrapper wrapper = getSelectedTerm(selection);
178
        String label = wrapper.getLabel();
179
        String uri = wrapper.getUri();
180
        String description = wrapper.getDescription();
181
        composite.getLblLabel().setText(label!=null?label:"");
182
        composite.getLblUri().setText(uri!=null?uri:"");
183
        composite.getLblDescription().setText(description!=null?description:"");
178
        if(wrapper!=null){
179
            String label = wrapper.getLabel();
180
            String uri = wrapper.getUri();
181
            String description = wrapper.getDescription();
182
            composite.getLblLabel().setText(label!=null?label:"");
183
            composite.getLblUri().setText(uri!=null?uri:"");
184
            composite.getLblDescription().setText(description!=null?description:"");
185
        }
184 186
    }
185 187

  
186 188
    private void loadTermDetails(){
187 189
        OntologyTermWrapper selectedWrapper = getSelectedTerm((IStructuredSelection) composite.getTreeTermHierarchy().getSelection());
188
        ParserUtil.loadDetails(selectedWrapper);
189
        updateDetails(new StructuredSelection(selectedWrapper));
190
        if(selectedWrapper!=null){
191
            ParserUtil.loadDetails(selectedWrapper);
192
            updateDetails(new StructuredSelection(selectedWrapper));
193
        }
190 194
    }
191 195

  
192 196
    private void search(){

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)