Quantcast
Channel: DotSpatial Issue Tracker Rss Feed
Viewing all articles
Browse latest Browse all 1128

Created Unassigned: Coordinate getHashCode() incorrect [63490]

$
0
0
The Equals() method of the DotSpatial.Topology.Coordinate class was overridden, but the getHashCode() function was not. Therefore, it is possible for equal coordinates to have different hashcodes, which leads to unexpected behavior when storing coordinates in for example, HashSets.

How to reproduce:
- Make Coordinate object and add to a HashSet
- Make another Coordinate object with the same coordinates, and also add to the same HashSet
Now the HashSet contains 2 Coordinate objects, while it should contain only one.

Viewing all articles
Browse latest Browse all 1128

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>