DelaunayNode#equals method raises NullPointerException
------------------------------------------------------

                 Key: GEOT-1451
                 URL: http://jira.codehaus.org/browse/GEOT-1451
             Project: GeoTools
          Issue Type: Bug
    Affects Versions: 2.3.4
         Environment: Linux 2.6
Java 1.6
            Reporter: Jan Torben Heuer


The implementation of equals compares the x & y coordinates of both objects. 
(There is a JAVADOC comment necessary because Coordinate also has a z-axis 
which is not checked!).

However, if coordinate is null, a NullPointerException is thrown.

    public boolean equals(Object o){
        return ((o instanceof DelaunayNode) &&
                (this.getCoordinate().x == ((DelaunayNode)o).getCoordinate().x) 
&&
                (this.getCoordinate().y == 
((DelaunayNode)o).getCoordinate().y));
    }

please fix it.

Thanks,

Jan

-- 
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.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to