RFR: 8217389: JTREG: Clean up, remove unused variable warnings

Leo Korinth leo.korinth at oracle.com
Fri Jan 18 17:23:43 UTC 2019


Hi,

Here I am removing warnings for unused variables.

Some variables can not be removed as in the case of creating a new 
primitive array without assigning it to a variable. It is not allowed, 
in those cases I use @SuppressWarnings("unused").

In some cases the variable is not used at all, and I remove it, but 
still add the variable name as a comment after the expression, as the 
variable name might have helped as documentation. I also just commented 
out "final int CONSTANT_Unicode = 2;" if that information might be 
useful in the future, it is a constant that we do not expect in the test 
case.

Otherwise I just try to remove the code.

This fix is somewhat based/dependent on the rest of my "JTREG:" webrevs.

Enhancement:
https://bugs.openjdk.java.net/browse/JDK-8217389

Webrev:
http://cr.openjdk.java.net/~lkorinth/8217389/00

Testing:
passed locally: open/test/hotspot/jtreg/:hotspot_gc

Thanks,
Leo


More information about the hotspot-gc-dev mailing list