Project

General

Profile

« Previous | Next » 

Revision a7c94d50

Added by Patrick Plitzner almost 7 years ago

Fix potential NPE

View differences:

eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/TaxonNodeLabelProvider.java
58 58
			try{
59 59
				Taxon taxon = HibernateProxyHelper.deproxy(taxonNode.getTaxon());
60 60
				if(taxon == null){
61
					return taxonNode.getClassification().getName().getText();
61
				    String text = taxonNode.getClassification().getName().getText();
62
					if(text==null){
63
					    text = taxonNode.getClassification().getTitleCache();
64
					}
65
                    return text;
62 66
					//MessagingUtils.error(getClass(), String.format(Messages.TaxonNodeLabelProvider_NODE_WITH_NO_TAXON, element), null);
63 67
//					throw new RuntimeException("The data your are trying to view is corrupt. Please check your import.");
64 68
				}else{
......
95 99
			styler = getNotGrantedStyler();
96 100
		}
97 101
		return new StyledString(getText(element), styler);
98

  
99 102
	}
100 103

  
101 104
	/**

Also available in: Unified diff