-
Enhancement
-
Resolution: Duplicate
-
P3
-
None
-
5.0
-
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.
> 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.
- duplicates
-
JDK-4887004 Add Integer Integer.valueOf(int i)
-
- Resolved
-