[OpenJDK 2D-Dev] JDK 9 RFR of JDK-8033624: Fix raw and unchecked lint warnings in sun.font
Joe Darcy
joe.darcy at oracle.com
Thu Feb 6 07:44:43 UTC 2014
On 02/05/2014 01:51 AM, Alan Bateman wrote:
> On 05/02/2014 07:41, Joe Darcy wrote:
>> Hello,
>>
>> Please review this change which resolves ~200 raw and unchecked
>> warnings in sun.font. (Afterward, the code is also free the of the
>> "cast" warning.)
>>
>> JDK-8033624 : Fix raw and unchecked lint warnings in sun.font
>> http://cr.openjdk.java.net/~darcy/8033624.0/
> I've skimmed through this and I don't see anything obviously wrong.
> There are a @SuppressWarnings("unchecked") on methods where I wonder
> if the scope could be reduced but this requires deeper knowledge of
> this area.
>
> -Alan.
For the range of @SuppressWarnings("unchecked"), if there was already a
declaration handy, I put the annotation on the declaration (minimal
scope). If there wasn't a declaration handy and the method was short,
say less than 10 lines, I put the annotation on the method. Otherwise, I
introduced a new declaration to host the annotation, roughly
@SuppressWarnings("unchecked")
Foo tmp = .... // generate the value with the unchecked condition
existingVariable = tmp; // types match so no warning here
-Joe
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/2d-dev/attachments/20140205/ab70991a/attachment.html>
More information about the 2d-dev
mailing list