JDK-4863076 : Boxed primitive classes need static factories.
  • Type: Enhancement
  • Component: specification
  • Sub-Component: language
  • Affected Version: 5.0
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: solaris_8
  • CPU: generic
  • Submitted: 2003-05-13
  • Updated: 2006-11-09
  • Resolved: 2006-11-09
Related Reports
Duplicate :  
Description
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.

Comments
EVALUATION All of the boxed primitive classes have a static constructor valueOf().
08-11-2006