Mercurial > dive4elements > river
changeset 1788:d5d2bffb26ca
Avoid NPE when compatibility matrix is empty for given output.
flys-artifacts/trunk@3111 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Fri, 28 Oct 2011 12:09:58 +0000 |
parents | f3be8fa1ec62 |
children | 205eb6f124a5 |
files | flys-artifacts/ChangeLog flys-artifacts/src/main/java/de/intevation/flys/collections/AttributeWriter.java |
diffstat | 2 files changed, 12 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog Fri Oct 28 10:24:26 2011 +0000 +++ b/flys-artifacts/ChangeLog Fri Oct 28 12:09:58 2011 +0000 @@ -1,3 +1,9 @@ +2011-10-28 Felix Wolfsteller <felix.wolfsteller@intevation.de> + + * src/main/java/de/intevation/flys/collections/AttributeWriter.java: + Survive case where a given output doesnt exist in compatibility + matrix. + 2011-10-28 Felix Wolfsteller <felix.wolfsteller@intevation.de> * src/main/java/de/intevation/flys/artifacts/states/StaticState.java:
--- a/flys-artifacts/src/main/java/de/intevation/flys/collections/AttributeWriter.java Fri Oct 28 10:24:26 2011 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/collections/AttributeWriter.java Fri Oct 28 12:09:58 2011 +0000 @@ -162,6 +162,12 @@ List<String> compatibleFacets) throws ArtifactDatabaseException { + + if (compatibleFacets == null) { + logger.warn("No compatible facets, not generating out."); + return; + } + int num = newFacets.size(); // Add all new Facets either in their old state or (if really