-
Bug
-
Resolution: Fixed
-
P3
-
1.4.0
-
rc1
-
generic, sparc
-
generic, solaris_2.6
###@###.### 2001-08-23
J2SE Version (please include all output from java -version flag):
J:\borsotti\jtest>java -version
java version "1.4.0-beta_refresh"
Java(TM) 2 Runtime Environment, Standard Edition (build
1.4.0-beta_refresh-b70)
Java HotSpot(TM) Client VM (build 1.4.0-beta_refresh-b70, mixed mode)
Does this problem occur on J2SE 1.3? Yes / No (pick one)
Yes
Operating System Configuration Information (be specific):
NT 4.0 service pack 5
Hardware Configuration Information (be specific):
Compaq Deskpro
Bug Description:
Incorrect API documentation of Map.get() and Map.containsKey().
Steps to Reproduce (be specific):
In package java.util, class Map, in method containsKey() it is stated:
"Returns true if this map contains a mapping for the specified key."
No mention is given that the method searches a mapping whose key
"equals" the specified one. This is different from searching a
mapping in which the key is identical to the specified one.
The same applies to the method get().
- duplicates
-
JDK-4491636 HashMap.containsKey() doesn`t work with null keys
-
- Closed
-