RFR (S): 8068026: [TESTBUG] Check for -client in gc/g1/TestHumongousCodeCacheRoots.java

Jesper Wilhelmsson jesper.wilhelmsson at oracle.com
Mon Jan 5 10:02:57 UTC 2015


It seems your change introduces dead code:

+        if (output.shouldContain("Unrecognized option: -client") == null) {
+            throw e;
+        }

If the string is found shouldContain will return a reference to 'output' (!= 
null), and if the string is not found it will throw an exception, so the 
introduced throw will never happen, right?

This means the original exception 'e' is lost and a different one is thrown if 
-client was accepted by the VM.


Lindenmaier, Goetz skrev den 5/1/15 10:38:
> Just a little reminder ... this is really small!
> From: Lindenmaier, Goetz
> Sent: Montag, 22. Dezember 2014 14:08
> To: 'hotspot-dev at openjdk.java.net'
> Subject: RFR (S): 8068026: [TESTBUG] Check for -client in gc/g1/TestHumongousCodeCacheRoots.java
> Hi,
> I please need a review and a sponsor for this tiny change:
> http://cr.openjdk.java.net/~goetz/webrevs/8068026-jtregClient/webrev.01/
> The test did not check whether -client is supported.
> The patch should also go to 8u60, please.
> Best regards,
>    Goetz

More information about the hotspot-dev mailing list