Re: module opens directive and Lookup::defineClass

2023-01-31 Thread Kasper Nielsen
On Tue, 31 Jan 2023 at 21:21, wrote: > > There is no conflict with JLS 7.2.2 as I can see. Thanks for getting back to me. Maybe there isn't a direct conflict. But I still think this is not very intuitive. If I have an application with two packages: com.acme.foreveryone com.acme.secret

Re: module opens directive and Lookup::defineClass

2023-01-31 Thread mandy . chung
There is no conflict with JLS 7.2.2 as I can see. Opens `some.package` to `some.other.module` means just one package.  It's true that the open packages can be extended at runtime. For example, `some.other.module` can update this module to open the package to another module at runtime via `Modu

module opens directive and Lookup::defineClass

2023-01-30 Thread Kasper Nielsen
Hi, I just saw the pull request for 8217920 (Lookup.defineClass injects a class that can access private members of any class in its own module.) The PR details how you can generate a class in a package that has been opened to you via a module declaration. This generated class can then create a ne