Implied readability + layers

Ali Ebrahimi ali.ebrahimi1781 at
Fri Nov 6 19:18:49 UTC 2015


On Fri, Nov 6, 2015 at 8:18 PM, Alan Bateman <Alan.Bateman at>

> On 06/11/2015 10:59, Ali Ebrahimi wrote:
>> :
>> module {
>>          requires com.baz;
>>          exports;
>> }
> In this example then will also need to require as
> otherwise will not compile (I assume you've deliberately removed
> the requires public for this example).
This is my bad, I emitted requires public when typing mail.
The is correct version:

module com.baz{
          requires public  com.baz;

Stil result is:

foo.canRead(bar2) -> true
foo.canRead(bar1) -> false
baz.canRead(bar1) -> true
baz.canRead(bar2) -> false

I figure out what is problem here:
If you try this sample once with exploded modules and then with modular
jars you will found.

Also, if you remove from root module list for cfg2 final result
will change:

 Configuration cfg2 = Configuration
                .resolve(finder2, layer1,ModuleFinder.empty(),"")

So all of this can not cause hard to find bugs in user applications.


Best Regards,
Ali Ebrahimi

More information about the jigsaw-dev mailing list