changeset 4024:62d99de39a8d

Avoid NPE if no attribute outs are present
author Björn Ricks <bjoern.ricks@intevation.de>
date Thu, 04 Oct 2012 13:59:03 +0200
parents e064e781d255
children 721d55bdab9e
files flys-artifacts/ChangeLog flys-artifacts/src/main/java/de/intevation/flys/collections/FLYSArtifactCollection.java
diffstat 2 files changed, 9 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog	Thu Oct 04 11:27:06 2012 +0200
+++ b/flys-artifacts/ChangeLog	Thu Oct 04 13:59:03 2012 +0200
@@ -1,7 +1,10 @@
+2012-10-01	Björn Ricks	<bjoern.ricks@intevation.de>
+
+	* src/main/java/de/intevation/flys/collections/FLYSArtifactCollection.java:
+	  Avoid NullPonterException if not attribute outs are present.
+
 2012-10-03	Felix Wolfsteller	<felix.wolfsteller@intevation.de>
-
 	Fix issue417.
-
 	* flys-artifacts/doc/conf/default-themes,
 	  flys-artifacts/doc/conf/second-themes,
 	  flys-artifacts/doc/conf/virtual-themes:
--- a/flys-artifacts/src/main/java/de/intevation/flys/collections/FLYSArtifactCollection.java	Thu Oct 04 11:27:06 2012 +0200
+++ b/flys-artifacts/src/main/java/de/intevation/flys/collections/FLYSArtifactCollection.java	Thu Oct 04 13:59:03 2012 +0200
@@ -374,7 +374,10 @@
         CollectionAttribute cAttr = parser.getCollectionAttribute();
 
         Output   output   = cAttr.getOutput(name);
-        Settings settings = output.getSettings();
+        Settings settings = null;
+        if (output != null) {
+            settings = output.getSettings();
+        }
 
         generator.init(format, out, context);
         generator.setSettings(settings);

http://dive4elements.wald.intevation.org