]> granicus.if.org Git - postgis/commitdiff
Add serialVersionUID for jdk1.5
authorMarkus Schaber <markus@schabi.de>
Mon, 28 Feb 2005 08:14:01 +0000 (08:14 +0000)
committerMarkus Schaber <markus@schabi.de>
Mon, 28 Feb 2005 08:14:01 +0000 (08:14 +0000)
correctly setType(), needed for jdbc 8.0+

git-svn-id: http://svn.osgeo.org/postgis/trunk@1449 b70326c6-7e19-0410-871a-916f4a2858ee

jdbc2/jtssrc/org/postgis/jts/JtsGeometry.java

index 09ed0613fe2cb6c1caad3030655fa7bb15bc6a75..9e5275c8c8fdc65c77d098afecf0f248cfd82bf9 100644 (file)
@@ -39,22 +39,26 @@ import java.sql.SQLException;
  */
 
 public class JtsGeometry extends PGobject {
+    /* JDK 1.5 Serialization */
+    private static final long serialVersionUID = 100;
 
     Geometry geom;
 
     final static WKTReader reader = new WKTReader();
     final static JtsBinaryParser bp = new JtsBinaryParser();
 
-
+    /** Constructor called by JDBC drivers */
     public JtsGeometry() {
-        //Constructor called by JDBC drivers
+        setType("geometry");
     }
 
     public JtsGeometry(Geometry geom) {
+        this();
         this.geom = geom;
     }
 
     public JtsGeometry(String value) throws SQLException {
+        this();
         setValue(value);
     }
 
@@ -70,7 +74,7 @@ public class JtsGeometry extends PGobject {
             } else {
                 Geometry result;
                 int srid = -1;
-                //break up geometry into srid and wkt
+                // break up geometry into srid and wkt
                 if (value.startsWith("SRID=")) {
                     String[] temp = value.split(";");
                     value = temp[1].trim();