On Thu, Jul 7, 2016 at 4:26 PM, Alan Bateman <alan.bate...@oracle.com> wrote: > On 07/07/2016 14:59, Volker Simonis wrote: > >> : >> >> - I was a little bit surprised that I could reflectively access and >> execute java.lang.VersionProps.parseVersionNumbers() where both the >> class and the method are package private. Maybe this is related to >> Jigsaw issue #ReflectiveAccessToNonExportedTypes [3]? As I'm not a >> Jigsaw expert, I'd be graceful to anybody explaining me why this is >> still so easily possible with Jigsaw? >> >> > java.lang is an exported package and I assume you are using > setAccessible(true) too. >
Yes, I do use setAccessible(true) but I naively expected it to fail. So does it mean the module system does not prevent me from reflectively using package private classes/methods from exported packages? Thanks, Volker > -Alan