Index: org/postgis/ComposedGeom.java
===================================================================
RCS file: /home/cvs/postgis/postgis/jdbc2/src/org/postgis/ComposedGeom.java,v
retrieving revision 1.7
diff -u -r1.7 ComposedGeom.java
--- org/postgis/ComposedGeom.java	28 Jul 2005 12:23:16 -0000	1.7
+++ org/postgis/ComposedGeom.java	9 May 2006 14:31:45 -0000
@@ -26,11 +26,12 @@
 
 package org.postgis;
 
-import org.postgresql.util.PGtokenizer;
-
 import java.sql.SQLException;
+import java.util.Arrays;
 import java.util.Iterator;
 
+import org.postgresql.util.PGtokenizer;
+
 /**
  * ComposedGeom - Abstract base class for all Geometries that are composed out
  * of other Geometries.
@@ -126,27 +127,13 @@
      */
     protected abstract Geometry[] createSubGeomArray(int size);
 
-    protected boolean equalsintern(Geometry other) {
-        // Can be assumed to be the same subclass of Geometry, so it must be a
-        // ComposedGeom, too.
+    public boolean equals(Object other) {
+    	if (!(other instanceof ComposedGeom)) return false;
+    	if (!super.equals(other)) return false;
+    	
         ComposedGeom cother = (ComposedGeom) other;
 
-        if (cother.subgeoms == null && subgeoms == null) {
-            return true;
-        } else if (cother.subgeoms == null || subgeoms == null) {
-            return false;
-        } else if (cother.subgeoms.length != subgeoms.length) {
-            return false;
-        } else if (subgeoms.length == 0) {
-            return true;
-        } else {
-            for (int i = 0; i < subgeoms.length; i++) {
-                if (!cother.subgeoms[i].equalsintern(this.subgeoms[i])) {
-                    return false;
-                }
-            }
-        }
-        return true;
+        return Arrays.equals(this.subgeoms, cother.subgeoms);
     }
 
     public int numPoints() {

