diff geo-backend/src/main/java/de/intevation/gnv/geobackend/base/DefaultResult.java @ 384:da2da7bb1aa1

Fixed a bug in DefaultResult when querying an index out of bounds. geo-backend/trunk@445 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Thu, 17 Dec 2009 11:14:45 +0000
parents 4af6379ac20b
children 12f88239fb33
line wrap: on
line diff
--- a/geo-backend/src/main/java/de/intevation/gnv/geobackend/base/DefaultResult.java	Tue Dec 15 10:02:24 2009 +0000
+++ b/geo-backend/src/main/java/de/intevation/gnv/geobackend/base/DefaultResult.java	Thu Dec 17 11:14:45 2009 +0000
@@ -87,7 +87,10 @@
      * @see de.intevation.gnv.geobackend.base.Result#getInteger(java.lang.String)
      */
     public Integer getInteger(String columnName) {
-        return getInteger(resultDescriptor.getColumnIndex(columnName));
+        int idx = resultDescriptor.getColumnIndex(columnName);
+
+        return idx > -1 ? getInteger(idx) : -1;
+        //return getInteger(resultDescriptor.getColumnIndex(columnName));
     }
 
     public Integer getInteger(int column) {

http://dive4elements.wald.intevation.org