Placing tests in java.lang package (for testing protected methods)

Tomasz Kowalczewski tomasz.kowalczewski at
Tue May 26 09:04:18 UTC 2015


I am trying to test a protected method of java.lang.String. Is this
possible with jtreg? If I specify:

* @run testng java.lang.StringIndexOfCharSequenceTest
package java.lang;

I will (unsurprisingly) get "SecurityException: Prohibited package name:
java.lang". I was thinking that there may be some jtreg magic to circumvent

Tomasz Kowalczewski
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the jtreg-use mailing list