Project

General

Profile

« Previous | Next » 

Revision 72d47c20

Added by Andreas Müller almost 7 years ago

fix #6681 fix NPE for MAs having no sec and incorrect taxon.sec/taxRel.citation

View differences:

eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/container/MisapplicationContainer.java
77 77
		if (StringUtils.isNotBlank(misappliedNameName.getAuthorshipCache())){
78 78
			author = ", non " + misappliedNameName.getAuthorshipCache();
79 79
		}
80
		if (misapplication.getCitation() == null) {
80
		if (getMisappliedName().getSec() == null) {
81 81
		    if (getMisappliedName().getAppendedPhrase() != null ){
82 82
		        title = getMisappliedName().getAppendedPhrase();
83 83
		    }else{
84
		        title = "auct."; //$NON-NLS-1$
84
		        title = "auct.";
85 85
		        
86 86
		    }
87 87
		  
88 88
		} else {
89
			String sec = " sensu "; //$NON-NLS-1$
89
			String sec = " sensu ";
90 90
			if (getMisappliedName().getAppendedPhrase() != null ){
91
			    sec = getMisappliedName().getAppendedPhrase() + " "+sec; //$NON-NLS-1$
91
			    sec = getMisappliedName().getAppendedPhrase() + " " + sec;
92 92
			}
93 93
			title += sec + getMisappliedName().getSec().getTitleCache();
94 94
		}
95 95
		title += author;
96
		title = title.replace("&", "&&"); //$NON-NLS-1$ //$NON-NLS-2$
96
		title = title.replace("&", "&&");
97 97
		setNonEditableInfo(title, false);
98 98
	}
99 99

  

Also available in: Unified diff