Warnings cleanup in java.lang.instrument, java.lang.management (late entry)
Jon VanAlten
jon.vanalten at redhat.com
Fri Dec 2 15:30:37 PST 2011
Hi,
----- Original Message -----
> From: "Mandy Chung" <mandy.chung at oracle.com>
> To: jdk8-dev at openjdk.java.net
> Sent: Friday, December 2, 2011 5:45:13 PM
> Subject: Re: Warnings cleanup in java.lang.instrument, java.lang.management (late entry)
>
> On 12/2/2011 1:11 PM, Jon VanAlten wrote:
> > Hi,
> >
> > This set is quite trivial, seemed almost not worth a webrev, but
> > nonetheless:
> >
> > http://icedtea.classpath.org/~vanaltj/webrevs/javalangwarnings/
> >
> Thanks for the fix. I can sponsor this trivial one.
>
Great, and thanks for looking at it!
>
> > I did make use of one @SuppressWarnings("unchecked") annotation;
> PlatformComponent.java
> L386: this can be replaced by calling the
> getMXBeans(mxbeanInterface)
> method that does the cast and with unchecked warning suppressed.
>
Ah, good idea.
> ClassDefinition.java
> L43: nit: the variable name was aligned with L48 and I will fix
> the formatting to get the name realigned.
>
I didn't notice the intentional alignment, sorry.
> > the same cause for this warning was being suppressed elsewhere in
> > the file and it looked like it would be a messy refactor to do
> > otherwise, if indeed it would even be possible.
> >
>
> There are two unchecked warning suppressed in PlatformComponent.java
> which are safe. What do you have in mind for the refactoring
> to eliminate these two @SuppressWarnings? I may be missing
> something but I don't see what refactoring can help. Anyway,
> this trivial fix will get rid of a few warnings. Thanks.
>
TBH, I hadn't really thought much on it. You are probably right that
there is no good way to help it.
For completeness, I've updated webrev:
http://icedtea.classpath.org/~vanaltj/webrevs/javalangwarnings/
Thanks,
jon
More information about the jdk8-dev
mailing list