changeset 995:e0df86bc6d31

Added kludge for the null type information of artifact data. flys-artifacts/trunk@2431 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Sun, 31 Jul 2011 19:07:02 +0000
parents 3f9d46dd259c
children f61fe8b561d2
files flys-artifacts/ChangeLog flys-artifacts/src/main/java/de/intevation/flys/artifacts/datacage/Datacage.java
diffstat 2 files changed, 10 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog	Sun Jul 31 17:30:29 2011 +0000
+++ b/flys-artifacts/ChangeLog	Sun Jul 31 19:07:02 2011 +0000
@@ -1,3 +1,9 @@
+2011-07-31  Sascha L. Teichmann <sascha.teichmann@intevation.de>
+
+	* src/main/java/de/intevation/flys/artifacts/datacage/Datacage.java:
+	  Added kludge for the types of artifact data. They seem to be null
+	  in some circumstances. Needs to be debugged!
+
 2011-07-31  Sascha L. Teichmann <sascha.teichmann@intevation.de>
 
 	* src/main/java/de/intevation/flys/artifacts/datacage/DBConfig.java:
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/datacage/Datacage.java	Sun Jul 31 17:30:29 2011 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/datacage/Datacage.java	Sun Jul 31 19:07:02 2011 +0000
@@ -312,7 +312,10 @@
                         int id = ids[i++];
                         stmnt.setInt(1, id);
                         stmnt.setInt(2, artifactId);
-                        stmnt.setString(3, sd.getType());
+                        // XXX: Where come the nulls from?
+                        String type = sd.getType();
+                        if (type == null) type = "String";
+                        stmnt.setString(3, type);
                         stmnt.setString(4, sd.getName());
                         setString(stmnt, 5, sd);
                         stmnt.execute();

http://dive4elements.wald.intevation.org