Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4495906

Incorrect API documentation of Map.get() and Map.containsKey()

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 1.4.0
    • 1.4.0
    • docs
    • 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().

            jjb Josh Bloch
            tyao Ting-Yun Ingrid Yao (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: