
6 Nov
2014
6 Nov
'14
3:28 a.m.
I’m not sure what the concurrency issue is related to this class, but it seems to have some problems around equality. First, it’s being used in a HashMap, which means both equals and hashCode need to be implemented. Second, the compareTo was using an unimplemented hashCode, which results in random sorting and inability to find two identical objects. I’m not sure I understand all the details of what RoadDef does, but I’ve fixed up the basic methods in the class to be consistent and added a test case around those methods. Brian