Project

General

Profile

« Previous | Next » 

Revision 462c058e

Added by Patrick Plitzner about 6 years ago

fix #7326 Fix potential NPE

View differences:

eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/AbstractEntityCollectionSection.java
216 216
	 */
217 217
	private void renderContent(boolean forceExpansion)
218 218
	{
219
		List<ELEMENT> elements = new ArrayList<>(getCollection(getEntity()));
220
		Collections.sort(elements, getComparator());
219
		Collection<ELEMENT> collection = getCollection(getEntity());
221 220

  
222
		if(elements == null || elements.isEmpty()){
221
		if(collection == null || collection.isEmpty()){
223 222
			createEmptyContent();
224 223
		}else{
224
		    List<ELEMENT> elements = new ArrayList<>(collection);
225
		    Collections.sort(elements, getComparator());
225 226
			createDynamicContents(elements);
226 227
			forceExpansion = true;
227 228
		}

Also available in: Unified diff