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

Boolean should have a static factory valueOf(boolean)

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 1.4.0
    • 1.3.0
    • core-libs
    • beta
    • generic
    • generic
    • Verified

      The wrapper class java.lang.Boolean currently lacks a static factory that takes a boolean. As a consequence, people use the constructor, which needlessly creates a new object. Note that Boolean does have a static factory to go with its String constructor, so in addition to being inefficient, it's inconsistent that this method is missing.

            jjb Josh Bloch
            jjb Josh Bloch
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: