[OpenJDK 2D-Dev] Fwd: Re: Warnings Cleanup in java.util.<various> (more from hack day)

Jim Graham james.graham at oracle.com
Sat Dec 3 00:27:38 UTC 2011


It looks like they are being very strict about the scope of changes...

			...jim

-------- Original Message --------
Subject: Re: Warnings Cleanup in java.util.<various> (more from hack day)
Date: Fri, 2 Dec 2011 16:16:33 -0800
From: John Rose <john.r.rose at oracle.com>
To: Martijn Verburg <martijnverburg at gmail.com>
CC: jdk8-dev at openjdk.java.net <jdk8-dev at openjdk.java.net>

On Dec 2, 2011, at 2:32 PM, Martijn Verburg wrote:

> I think the original patch provider (Prasanna) was aiming at simply
> removing the deprecation warning.  Interesting point on the performance
> aspect!

Presently we are aiming at removing warnings with no changes to 
semantics (i.e., bytecodes).

I'll risk stating the obvious:  If we have 900 warnings removals, and 30 
of them remove warnings by changing code (to call a non-deprecated API 
element), and 1 of those 30 introduces a bug, we have put the 900 
removals at risk, because we have made it much harder for the integrator 
to batch the warning changes.

So let's try to keep the deprecated call and suppress the deprecation. 
(There may be an exception, of course; that's when reviews help.)

And (this is equally important) comment the @SuppressWarnings() with the 
relevant information.

         @SuppressWarnings("deprecation")  // String(byte[],int) in 
String has been deprecated
         // and this is actually useful because alskjdflsadkfjasl
         String x = new String(new byte[0], 0);

Thanks!

-- John



More information about the 2d-dev mailing list