Style Clone
-----------

         Key: GEOT-780
         URL: http://jira.codehaus.org/browse/GEOT-780
     Project: GeoTools
        Type: Bug

  Components: styling  
    Versions: 2.2.M2    
    Reporter: Jody Garnett



I had a look at some of the style model objects implementations. I notice the 
equals() methods all look for an instance of the same Impl class, and not of 
the actual interface. For example FillImpl:

 public boolean equals(Object oth) {
        if (this == oth) {
            return true;
        }

        if (oth instanceof FillImpl) {
            FillImpl other = (FillImpl) oth;
            return Utilities.equals(this.color, other.color) &&
                   Utilities.equals(this.backgroundColor, 
other.backgroundColor) &&
                   Utilities.equals(this.opacity, other.opacity) &&
                   Utilities.equals(this.graphicFill, other.graphicFill);
        }

        return false;
    }

Isn't this a problem? If someone comes along with their own implementation of 
Fill, this comparison will fail even if they are identifical in every other 
case.


-Justin 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to