changeset 2111:85d31c2620e5

Avoid an unlikely NPE. flys-artifacts/trunk@3674 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Fri, 13 Jan 2012 11:40:27 +0000
parents 7c5bcb0e03e1
children 2d0b22602fc2
files flys-artifacts/ChangeLog flys-artifacts/src/main/java/de/intevation/flys/artifacts/FLYSArtifact.java
diffstat 2 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog	Fri Jan 13 11:08:41 2012 +0000
+++ b/flys-artifacts/ChangeLog	Fri Jan 13 11:40:27 2012 +0000
@@ -1,3 +1,8 @@
+2011-01-13	Felix Wolfsteller	<felix.wolfsteller@intevation.de>
+
+	* src/main/java/de/intevation/flys/artifacts/FLYSArtifact.java:
+	  Avoid NPE when copying data from one artifact to another.
+
 2011-01-13	Felix Wolfsteller	<felix.wolfsteller@intevation.de>
 
 	* src/main/java/de/intevation/flys/exports/XYChartGenerator.java:
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/FLYSArtifact.java	Fri Jan 13 11:08:41 2012 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/FLYSArtifact.java	Fri Jan 13 11:40:27 2012 +0000
@@ -185,12 +185,14 @@
 
     /**
      * Copies data item from other artifact to this artifact.
+     *
      * @param other Artifact from which to get data.
      * @param name  Name of data.
      */
     protected void importData(FLYSArtifact other, final String name) {
         if (other == null) {
             logger.error("No other art. to import data " + name + " from.");
+            return;
         }
 
         StateData sd = other.getData(name);

http://dive4elements.wald.intevation.org