Closed lukaseder closed 6 years ago
The InaccessibleObjectException in the travis build suggests that a pre-release build of JDK 9 was used, not JDK 9 or 9.0.1. JDK 9, 10 and 11 open java.lang.invoke to code on the class path so that existing hacks continue to work.
Thanks, @AlanBateman. Do you have an authoritative link for this? I'm particularly interested if this is a "we'll continue to allow for this to work for a while" situation, or "this will be guaranteed to work indefinitely" situation.
The "Relaxed strong encapsulation" section of JEP 261 has the details. The default did not change in JDK 10 or JDK 11.
Thanks a lot for your help and for reaching out. And for having been authoritative, all along :-) (I hadn't realised this was partially your work)
In JDK 9.0.1, tests fail as can be seen on travis: https://travis-ci.org/jOOQ/jOOR/builds/357395818
Curiously, it doesn't fail in JDK 10.0.0, nor in 9.0.4. Perhaps some regression in the JDK...
We should use JDK 9's new API
MethodHandles.privateLookupIn()