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

Reply via email to