The addition of boxing to the language benefits from new static factories that
can cache the boxed values. We propose to add the method
public Integer valueOf(int i)
to java.lang.Integer, and corresponding methods to all the other boxed
value classes.
can cache the boxed values. We propose to add the method
public Integer valueOf(int i)
to java.lang.Integer, and corresponding methods to all the other boxed
value classes.
- duplicates
-
JDK-4863076 Boxed primitive classes need static factories.
- Closed
- relates to
-
JDK-4889342 (proxy) generated code should use static methods, not constructors, for boxing
- Closed