Warnings cleanup in java.lang.instrument, java.lang.management (late entry)
Mandy Chung
mandy.chung at oracle.com
Fri Dec 2 14:45:13 PST 2011
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.
> 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.
ClassDefinition.java
L43: nit: the variable name was aligned with L48 and I will fix
the formatting to get the name realigned.
> 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.
> Comments? Would anyone like to create a bug and sponsor this set?
>
7117585 Eliminate java.lang.instrument, java.lang.management warnings
Mandy
More information about the jdk8-dev
mailing list