On 13.07.2016 13:47, David M. Lloyd wrote:
On 07/12/2016 03:25 PM, Alan Bateman wrote:
On 12/07/2016 18:31, Sanne Grinovero wrote:
[...]
The issue that `public` no longer implies accessible is listed in JEP
261 (first item in the Risks and Assumption) but to be honest, has
barely come up to date. That probably isn't too surprising as it's still
early days for modules and many projects aren't trying out JDK 9 yet.
Anyone trying out modules where a "module unaware" framework gets a
reference to a public type in a non-exported package might run into it
of course but I'm not aware of any reports yet.
Isn't that what this entire thread is about? And also, what the whole
#ReflectiveAccessToNonExportedTypes issue is about? If not, consider
this the official report that dozens if not hundreds of such frameworks
are broken under Java 9. I have been bringing it up for many months,
and this is a result of testing, not of guesswork.
There is for example setAccessible throwing
java.lang.reflect.InaccessibleObjectException. What happens in Groovy
then? We go the hierarchy up till we find a class for which we can do
that, or stop at Object. That of course is also because of referencing a
public type in a non-exported package. See this list 10 months ago.
And even though we tried to start testing JDK9 early, we still do not
have a Groovy module today. And the lack of information about how to
handle the dynamic aspects of modules does not make this more easy. One
time it is about "we have to still write this down", other times it is
about the discussion just dying down. Every time there might have been
good reasons for this, but the effect is clear on me: I am missing
information. And the javadoc plus the "The State of the Module System"
is not clear enough for me. And my summary is: without blaming anyone
really, it is still just frustrating.
bye Jochen