Revision 3645336f
Added by Katja Luther almost 3 years ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/CollectorSelectionDialog.java | ||
---|---|---|
17 | 17 |
import eu.etaxonomy.cdm.model.agent.AgentBase; |
18 | 18 |
import eu.etaxonomy.cdm.model.metadata.PreferencePredicate; |
19 | 19 |
import eu.etaxonomy.cdm.persistence.dto.TeamOrPersonUuidAndTitleCache; |
20 |
import eu.etaxonomy.cdm.persistence.dto.UuidAndTitleCache; |
|
20 | 21 |
import eu.etaxonomy.taxeditor.preference.PreferencesUtil; |
21 | 22 |
|
22 | 23 |
/** |
... | ... | |
56 | 57 |
if (element == null) { |
57 | 58 |
return null; |
58 | 59 |
} |
59 |
TeamOrPersonUuidAndTitleCache uuidAndTitleCache = (TeamOrPersonUuidAndTitleCache) element;
|
|
60 |
UuidAndTitleCache uuidAndTitleCache = (UuidAndTitleCache) element;
|
|
60 | 61 |
String titleCache = uuidAndTitleCache.getTitleCache(); |
61 | 62 |
String abbrevTitleCache = uuidAndTitleCache.getAbbrevTitleCache(); |
62 |
String collectorTitleCache = uuidAndTitleCache.getCollectorTitleCache(); |
|
63 |
String collectorTitleCache = null; |
|
64 |
if (element instanceof TeamOrPersonUuidAndTitleCache){ |
|
65 |
collectorTitleCache = ((TeamOrPersonUuidAndTitleCache)element).getCollectorTitleCache(); |
|
66 |
} |
|
63 | 67 |
if (!titleCache.equals(abbrevTitleCache)){ |
64 | 68 |
titleCache += " - " + abbrevTitleCache; |
65 | 69 |
} |
66 |
if (!uuidAndTitleCache.getTitleCache().equals(collectorTitleCache) && !abbrevTitleCache.equals(collectorTitleCache)){ |
|
70 |
if (collectorTitleCache != null && !uuidAndTitleCache.getTitleCache().equals(collectorTitleCache) && !abbrevTitleCache.equals(collectorTitleCache)){
|
|
67 | 71 |
titleCache += " - " + collectorTitleCache; |
68 | 72 |
} |
69 | 73 |
if(PreferencesUtil.getBooleanValue(PreferencePredicate.ShowIdInSelectionDialog.getKey())){ |
Also available in: Unified diff
ref #7309: avoid CCE