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

(spec) Error in examples in javadoc for Boolean.valueOf(String)

XMLWordPrintable

    • b29
    • generic, x86
    • generic, solaris_8



      Name: gm110360 Date: 11/01/2002


      FULL PRODUCT VERSION :
      java version "1.4.0"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-b92)
      Java HotSpot(TM) Client VM (build 1.4.0-b92, mixed mode)

      A DESCRIPTION OF THE PROBLEM :
      The subpage regarding valueOf says
      public static Boolean valueOf(String s)Returns a Boolean
      with a value represented by the specified String. The
      Boolean returned represents the value true if the string
      argument is not null and is equal, ignoring case, to the
      string "true".
      Example: Boolean.valueOf("True") returns true.
      Example: Boolean.valueOf("yes") returns false.

      Since valueof() returns a Boolean and not a boolean, the
      two examples should replace true and false respectively
      with "a Boolean equal to Boolean.TRUE" and "a Boolean equal
      to Boolean.FALSE"

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      1. Check out the documentation
      2.
      3.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      Different documentation

      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      Not applicable
      ---------- END SOURCE ----------
      (Review ID: 166541)
      ======================================================================

            darcy Joe Darcy
            gmanwanisunw Girish Manwani (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: