Revision dbb48641
Added by Andreas Müller about 5 years ago
cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/common/RelationshipTermBase.java | ||
---|---|---|
142 | 142 |
} |
143 | 143 |
|
144 | 144 |
public Representation getInverseRepresentation(Language lang) { |
145 |
Representation result = null; |
|
145 |
if (lang == null){ |
|
146 |
return null; |
|
147 |
} |
|
148 |
Representation result = null; |
|
146 | 149 |
if (this.isSymmetric()){ |
147 | 150 |
for (Representation repr : this.getRepresentations()){ |
148 |
if (lang.equals(repr.getLanguage())){ |
|
151 |
if (repr != null && lang.equals(repr.getLanguage())){
|
|
149 | 152 |
result = repr; |
150 | 153 |
} |
151 | 154 |
} |
152 | 155 |
}else{ |
153 | 156 |
for (Representation repr : this.getInverseRepresentations()){ |
154 |
if (lang.equals(repr.getLanguage())){ |
|
157 |
if (repr != null && lang.equals(repr.getLanguage())){
|
|
155 | 158 |
result = repr; |
156 | 159 |
} |
157 | 160 |
} |
Also available in: Unified diff
fix #7896 fix NPE in RelationshipTermBase.getInverseRepresentation