Project

General

Profile

Revision ffd20969

IDffd20969547dae240b35c966f7c90b85abd5d2db
Parent c6315a5d
Child c6828e67

Added by Katja Luther about 1 year ago

fix NoSuchElementException for taxa without nodes

View differences:

eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/e4/TaxonNavigatorE4.java
298 298
	            if (editor instanceof TaxonNameEditorE4){
299 299
	                taxonNode = new TaxonNodeDto( ((TaxonNameEditorE4)editor).getEditorInput().getTaxonNode());
300 300
	            }else{
301
	                taxonNode = new TaxonNodeDto(editor.getTaxon().getTaxonNodes().iterator().next());
301
	                if (editor.getTaxon().getTaxonNodes() != null && !editor.getTaxon().getTaxonNodes().isEmpty()){
302
	                    taxonNode = new TaxonNodeDto(editor.getTaxon().getTaxonNodes().iterator().next());
303
	                }
302 304
	            }
305

  
303 306
	            viewer.reveal(taxonNode);
304 307
	            viewer.setSelection(new StructuredSelection(taxonNode));
305 308
	        }

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)