changeset 3829:e6186ab00553

Fix a NullPointerException When iterating over a list it must be checked if the reference to the list is valid. flys-client/trunk@5524 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Bjoern Ricks <bjoern.ricks@intevation.de>
date Wed, 19 Sep 2012 13:14:46 +0000
parents 9cbc8311e820
children 60911c8422b7
files flys-client/ChangeLog flys-client/src/main/java/de/intevation/flys/client/shared/model/DefaultArtifactDescription.java
diffstat 2 files changed, 9 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/flys-client/ChangeLog	Wed Sep 19 12:51:02 2012 +0000
+++ b/flys-client/ChangeLog	Wed Sep 19 13:14:46 2012 +0000
@@ -1,3 +1,9 @@
+2012-09-19	Björn Ricks	<bjoern.ricks@intevation.de>
+
+	* src/main/java/de/intevation/flys/client/shared/model/DefaultArtifactDescription.java:
+	  Fix NullPointerException when going back in WINFO artifact to the river
+	  selection.
+
 2012-09-19	Björn Ricks	<bjoern.ricks@intevation.de>
 
 	* src/main/java/de/intevation/flys/client/client/FLYSConstants_en.properties,
--- a/flys-client/src/main/java/de/intevation/flys/client/shared/model/DefaultArtifactDescription.java	Wed Sep 19 12:51:02 2012 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/shared/model/DefaultArtifactDescription.java	Wed Sep 19 13:14:46 2012 +0000
@@ -161,6 +161,9 @@
 
 
     public String getDataValueAsString(String name) {
+        if (oldData == null) {
+            return null;
+        }
         for (DataList list: oldData) {
             List<Data> dataList = list.getAll();
 

http://dive4elements.wald.intevation.org