jdbi: JDK9 will block setAccessible on modules
We’re using setAccessible(true) to get reflective access to private API in a couple places. We cannot count on this after JDK9 is released.
In particular, DefaultMethodHandler in SQL Object is using setAccessible to get access to the MethodHandle.Lookup for private members, so that we can invoke the default (“super”) method.
See:
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Reactions: 1
- Comments: 22 (19 by maintainers)
Commits related to this issue
- Shotgun fixes #2 Problems on default methods accessibility in Jdbi had started from jdk9: https://github.com/jdbi/jdbi/issues/497 — committed to mrGlebao/RESTful by mrGlebao 6 years ago
This should be supported in the next Jdbi release–probably v3.2.0
We’re very interested in Java 9 support but frankly I haven’t started looking into it yet. Last I looked the ecosystem clearly still needed time to settle, but maybe it is time to bump the priority of this.
There is no obvious change in jdk9, it is better to go straight to 10
I am removing this from release blockers. An upstream fix doesn’t seem likely to appear soon, and JDK9 isn’t released yet. The eventual fix should not affect public API.