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

Boxed primitive classes need static factories.

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Duplicate
    • Icon: P3 P3
    • None
    • 5.0
    • specification
    • None
    • generic
    • solaris_8

      From ###@###.###:
      > Boolean has valueOf(boolean), which is a very good thing. But Integer
      > needs valueOf(int), which should at least cache a few well-known values. In
      > retrospect, it's a bug that any of the primitive wrapper classes have public
      > constructors.

      All of the boxed primitive classes should have a static constructor valueOf().
      This will simplify the boxing spec and implementation.

            abuckley Alex Buckley
            gafter Neal Gafter (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: