On Wed, 4 Jan 2023 08:57:25 GMT, Per Minborg <pminb...@openjdk.org> wrote:

> Is there a better way to test packet-private methods in Bits without 
> resorting to reflection?

Yes, looking for directories named java.base in the test tree and you'll see 
test classes that are compiled into java.base/java.net, 
java.base/java.lang.invoke and other packages so they can be used to test 
package private methods. When you look at the tests you'll see there are a 
couple of approaches used. Some tests are in the same runtime package, others 
add a public class with public methods into the runtime package that the test 
can use.

-------------

PR: https://git.openjdk.org/jdk/pull/11840

Reply via email to