Mercurial > dive4elements > river
comparison artifacts/src/main/java/org/dive4elements/river/themes/ThemeMapping.java @ 6931:2c8e5bad8699
Fix NPE in case the artifact does not even have the master attribute
Started happening with the new other.wqkms.w attribute condition
and official lines in waterlevel calculations
author | Andre Heinecke <aheinecke@intevation.de> |
---|---|
date | Tue, 27 Aug 2013 18:35:51 +0200 |
parents | af13ceeba52a |
children | e4606eae8ea5 |
comparison
equal
deleted
inserted
replaced
6930:750ce031e8e0 | 6931:2c8e5bad8699 |
---|---|
131 + masterAttr + "_"); | 131 + masterAttr + "_"); |
132 return false; | 132 return false; |
133 } | 133 } |
134 | 134 |
135 // Test. | 135 // Test. |
136 if (artifact.getDataAsString(parts[0]).equals(parts[1])) { | 136 String artData = artifact.getDataAsString(parts[0]); |
137 if (artData != null && artData.equals(parts[1])) { | |
137 logger.debug("Matches master Attribute."); | 138 logger.debug("Matches master Attribute."); |
138 return true; | 139 return true; |
139 } | 140 } |
140 else { | 141 else { |
141 logger.debug("Does not match master Attribute."); | 142 logger.debug("Does not match master Attribute."); |