Project

General

Profile

Revision 03e96dec

ID03e96decf0ab2177676b131c470c3340a33ea37f
Parent 28027bed
Child 7dcb230b

Added by Katja Luther almost 3 years ago

also add null check in comparator of nomenclaturalReferenceSelectionDialog

View differences:

eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/NomenclaturalReferenceSelectionDialog.java
157 157
			public int compare(UuidAndTitleCache entity1,
158 158
					UuidAndTitleCache entity2) {
159 159
				Collator collator = Collator.getInstance();
160
				String compareString1 = null;
161
				if (entity1.getAbbrevTitleCache() == null){
162
					compareString1 = entity1.getTitleCache();
163
				}else{
160
				String compareString1 = "";
161
				if (entity1.getAbbrevTitleCache() != null){
164 162
					compareString1 = entity1.getAbbrevTitleCache();
165 163
				}
166
				String compareString2 = null;
167
				if (entity2.getAbbrevTitleCache() == null){
168
					compareString2 = entity2.getTitleCache();
169
				}else{
164
				if (entity1.getTitleCache() != null){
165
					compareString1 += entity1.getTitleCache();
166
				}
167
				String compareString2 = "";
168
				if (entity2.getAbbrevTitleCache() != null){
170 169
					compareString2 = entity2.getAbbrevTitleCache();
171 170
				}
171
				if (entity2.getTitleCache() != null){
172
					compareString2 += entity2.getTitleCache();
173
				}
172 174
				return collator.compare(compareString1, compareString2);
173 175
			}
174 176
		};

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)