Project

General

Profile

« Previous | Next » 

Revision 0b629053

Added by Andreas Müller over 1 year ago

ref #10108 avoid NPE in MediaSpecimenGeneralDetailElement

View differences:

eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/media/MediaSpecimenGeneralDetailElement.java
8 8
 */
9 9
package eu.etaxonomy.taxeditor.ui.section.occurrence.media;
10 10

  
11
import org.apache.commons.lang.StringUtils;
11 12
import org.eclipse.swt.SWT;
12 13

  
13 14
import eu.etaxonomy.cdm.api.service.IVocabularyService;
......
81 82
            if (getEntity() != null && media.getAllDescriptions() != null && !media.getAllDescriptions().isEmpty() ) {
82 83
            	boolean textExist = false;
83 84
            	for (LanguageString lngStr: media.getAllDescriptions().values()) {
84
            		if (!lngStr.getText().isEmpty()) {
85
            		if (StringUtils.isNotBlank(lngStr.getText())) {
85 86
            			textExist = true;
86 87
            		}
87 88
            	}
......
91 92
            }
92 93

  
93 94
//            text_description = formFactory.createMultiLanguageTextElement(this, "Description", media.getAllDescriptions(), 200, SWT.WRAP);
94
            
95

  
95 96
            LabelElement label1 = formFactory.createLabel(formElement, "");
96 97

  
97 98
            selectionArtist = formFactory.createSelectionElement(AgentBase.class, //getConversationHolder(),

Also available in: Unified diff