Opened 18 years ago

Closed 18 years ago

#410 closed defect (fixed)

The inner class Base1PluginExecutor.PosRep should implement the hashCode method

Reported by: Nicklas Nordborg Owned by: Johan Enell
Priority: major Milestone: BASE 2.1
Component: coreplugins Version:
Keywords: Cc:

Description

Using a PosMap as a key in a hashmap doesn't work unless the both equals and hashCode is overridden. If the equals method returns true the hashCode must be the same. In the following code 'position' is most likely always null but it depends on the hashCode of the newly created object.

1010: PosRep pr = new PosRep(position, reporter);
1011: position = posMap.get(pr);

Change History (1)

comment:1 by Johan Enell, 18 years ago

Resolution: fixed
Status: newclosed

(In [2836]) Fixes #410

Note: See TracTickets for help on using tickets.