Re: Unsafe and JPMS

2018-01-20 Thread Alan Bateman
On 20/01/2018 00:07, Jeremy Manson wrote: : The other place I saw that this came up is the cglib code generation library, which now uses Unsafe to access ClassLoader.defineClass (for any ClassLoader).  This is useful for generating classes for dependency injection / mocking / that kind of thi

Re: Unsafe and JPMS

2018-01-19 Thread Alan Bateman
On 19/01/2018 18:31, Jeremy Manson wrote: : 1) testStaticsDiscovery(com.google.common.profile.HeapInspectorTest)java.lang.reflect.InaccessibleObjectException: Unable to make field final jdk.internal.loader.URLClassPath jdk.internal.loader.ClassLoaders$AppClassLoader.ucp accessible: module ja

Re: Unsafe and JPMS

2018-01-19 Thread Jochen Theodorou
On 19.01.2018 19:31, Jeremy Manson wrote: [...] I generally agree with the principle of making real APIs to do what we need to do with Unsafe and migrating. My concern is not the removal of Unsafe, it's that the replacement won't be equivalent if it doesn't let you cross module boundaries. It

Re: Unsafe and JPMS

2018-01-19 Thread Alan Bateman
Moving this thread to jigsaw-dev as that is where this topic has been discussed ad nauseam. On 19/01/2018 01:28, Jeremy Manson wrote: Hey folks, I know this has come up before, but I wanted to revive the question. As we play more and more with JPMS and Java 9, we're finding more and more plac