RFR: 8252180: [JEP 390] Deprecate wrapper class constructors for removal
Joe Darcy
darcy at openjdk.java.net
Fri Oct 9 23:41:17 UTC 2020
On Fri, 9 Oct 2020 17:49:09 GMT, Roger Riggs <rriggs at openjdk.org> wrote:
> The public constructors of the following classes have been deprecated since SE 9, and should be deprecated for removal
> in anticipation of these classes becoming inline classes.
> java.lang.Boolean, Byte, Short, Integer, Long, Float, Double, and Character.
>
> Existing uses of the constructors are converted to use the .valueOf(xxx) methods in classes and tests.
test/jdk/java/lang/WrappersTest.java line 1:
> 1: /*
We have historically not found it necessary to write tests to verify this kind of change and have instead relied on
signature testing.
src/java.xml/share/classes/com/sun/org/apache/xml/internal/serialize/HTMLdtd.java line 441:
> 439: {
> 440: if ( _byName.get( name ) == null ) {
> 441: _byName.put( name, new Integer( value ) );
Please make sure @JoeWang-Java reviews the XML changes; there are complications in some areas where the master code is
upstream of the code in the JDK.
-------------
PR: https://git.openjdk.java.net/valhalla/pull/221
More information about the valhalla-dev
mailing list