Project

General

Profile

« Previous | Next » 

Revision c58ab5d6

Added by Katja Luther over 2 years ago

ref #9762: avoid NPE

View differences:

eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/combo/term/TermComboElement.java
420 420
	 * @param terms a {@link List} of T objects or <code>null</code> for default preferred terms
421 421
	 */
422 422
	public void setTerms(List<T> terms) {
423
		setSelection(null);
423
//		setSelection(null);
424 424
		customPreferredTerms = terms;
425 425
		populateTerms(customPreferredTerms);
426 426
	}
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/name/NameDetailElement.java
86 86
			comparator = new Comparator<Rank>(){
87 87
				@Override
88 88
				public int compare(Rank o1, Rank o2) {
89
				    if (o2 == null){
90
				        return -1;
91
				    }
89 92
					return o1.compareTo(o2);
90 93
				}
91 94
			};
......
178 181
			switch(code){
179 182
			case ICNAFP :
180 183
				//nothing do add
181
			    if (nonViralName.getRank().isCultivar()){
184
			    if (nonViralName.getRank() != null && nonViralName.getRank().isCultivar()){
182 185
			        createCultivarNameParts(formElement, nonViralName, style);
183 186
			    }else{
184 187
			        createBotanicalNameParts(formElement, nonViralName, style);

Also available in: Unified diff