Index: org/postgis/jts/JtsGeometry.java
===================================================================
RCS file: /home/cvs/postgis/postgis/jdbc2/jtssrc/org/postgis/jts/JtsGeometry.java,v
retrieving revision 1.11
diff -u -r1.11 JtsGeometry.java
--- org/postgis/jts/JtsGeometry.java	9 May 2006 13:06:56 -0000	1.11
+++ org/postgis/jts/JtsGeometry.java	9 May 2006 13:39:11 -0000
@@ -140,14 +140,14 @@
     }
 
     public boolean equals(Object obj) {
-        if ((obj != null) && (obj instanceof JtsGeometry)) {
-            Geometry other = ((JtsGeometry) obj).geom;
-            if (this.geom == other) { // handles identity as well as both ==null
-                return true;
-            } else if (this.geom != null && other != null) {
-                return other.equals(this.geom);
-            }
+    	if (obj == this) return true;
+    	if (!(obj instanceof JtsGeometry)) return false;
+    	
+        Geometry other = ((JtsGeometry) obj).geom;
+        if (other == null) {
+            return (this.geom == null);
+        } else {
+            return other.equals(this.geom);
         }
-        return false;
     }
 }

