Index: org/postgis/Geometry.java
===================================================================
RCS file: /home/cvs/postgis/postgis/jdbc2/src/org/postgis/Geometry.java,v
retrieving revision 1.8
diff -u -r1.8 Geometry.java
--- org/postgis/Geometry.java	9 May 2006 13:06:55 -0000	1.8
+++ org/postgis/Geometry.java	9 May 2006 14:00:50 -0000
@@ -136,35 +136,19 @@
     /**
      * java.lang.Object equals implementation
      */
-    public boolean equals(Object other) {
-        return (other != null) && (other instanceof Geometry) && equals((Geometry) other);
-    }
+    public boolean equals(Object obj) {
+    	if (obj == this) return true;
+    	if (!(obj instanceof Geometry)) return false;
+
+    	Geometry other = (Geometry)obj;
+    	
+    	boolean firstline  = (this.dimension == other.dimension) && (this.type == other.type);
+    	boolean secondline = (this.srid == other.srid) && (this.haveMeasure == other.haveMeasure);
 
-    /**
-     * geometry specific equals implementation - only defined for non-null
-     * values
-     */
-    public boolean equals(Geometry other) {
-        boolean firstline = (other != null) && (this.dimension == other.dimension)
-                && (this.type == other.type);
-        boolean sridequals = (this.srid == other.srid);
-        boolean measEquals = (this.haveMeasure == other.haveMeasure);
-        boolean secondline = sridequals && measEquals;
-        boolean classequals = other.getClass().equals(this.getClass());
-        boolean equalsintern = this.equalsintern(other);
-        boolean result = firstline && secondline && classequals && equalsintern;
-        return result;
+    	return firstline && secondline;
     }
 
     /**
-     * Whether test coordinates for geometry - subclass specific code
-     * 
-     * Implementors can assume that dimensin, type, srid and haveMeasure are
-     * equal, other != null and other is the same subclass.
-     */
-    protected abstract boolean equalsintern(Geometry other);
-
-    /**
      * Return the number of Points of the geometry
      */
     public abstract int numPoints();

