RFR: 8299576: Reimplement java.io.Bits using VarHandle access
Alan Bateman
alanb at openjdk.org
Wed Jan 4 09:10:50 UTC 2023
On Wed, 4 Jan 2023 08:57:25 GMT, Per Minborg <pminborg at 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
More information about the core-libs-dev
mailing list