Bug 41900 - wrong implementation of SlidePrincipal.equals method
Summary: wrong implementation of SlidePrincipal.equals method
Alias: None
Product: Slide
Classification: Unclassified
Component: Core (show other bugs)
Version: 2.1
Hardware: Other All
: P2 normal (vote)
Target Milestone: 2.2
Assignee: Slide Developer List
URL: http://auk.tomsk.ru
Keywords: PatchAvailable
Depends on:
Reported: 2007-03-20 04:27 UTC by Alexey A. Ukhov
Modified: 2007-03-25 14:44 UTC (History)
0 users


Note You need to log in before you can comment on or make changes to this bug.
Description Alexey A. Ukhov 2007-03-20 04:27:06 UTC
dear developers!
with this implementation of equal method some code (who expects equal(Object)
method) doesn't work correctly. Example:
Map map = new HashMap();
map.put(new SlidePrincipal("test"), null);

and call
map.contains(new SlidePrincipal("test"));
returns false.

Could you add something like:
public boolean equals(Object data)
  if (data instanceof SlidePrincipal)
    return equals((SlidePrincipal) data);
  return false;

Thanks in advance!

Alexey A. Ukhov
startext GmbH
Comment 1 Antoine Levy-Lambert 2007-03-25 14:44:51 UTC
Patch committed. Thanks.