I have implemented a work around in Woden, iterating through the List and using '==' rather than .equals(). So I am not held up by XmlSchemaObject.equals, but I'm still willing to make the suggested change in XmlSchema if it's agreed.
John Kaputin ----- Forwarded by John Kaputin/UK/IBM on 21/01/2006 13:02 ----- John Kaputin/UK/IBM To 21/01/2006 12:28 general@ws.apache.org cc woden-dev@ws.apache.org Subject Bug in XmlSchemaObject.equals method The XmlSchemaObject.equals method is: public boolean equals(Object what) { // toDO : implement this once everything completed return true; } This is causing a problem in Woden. I have a java.util.List of XmlSchema. I use the List.contains(object) method and the java.util.Vector implementation calls the equals method on the XmlSchema instance, which inherits XmlSchemaObject.equals. True is always returned, even if the XmlSchema objects are different. There may be some longer term plan to override the equals method in the subclasses of XmlSchemaObject to perform equivalence checking rather than an object reference comparison, but I can't see the purpose of the current XmlSchemaObject.equals implementation - even as a short term measure. I propose either changing XmlSchemaObject.equals to perform an object reference comparison (or just removing the method altogether), or otherwise overriding it in XmlSchema to perform an object reference comparison. This would allow me to move forward in Woden in the short term, even if there is a longer term plan for equivalence checking in XmlSchema. I am happy to make this change. Any agreement or objections? regards, John Kaputin