Question on Implied readability

Frank Yuan frank.yuan at
Tue Nov 3 04:07:34 UTC 2015

> -----Original Message-----
> From: jigsaw-dev [mailto:jigsaw-dev-bounces at] On Behalf Of Alex Buckley
> Sent: Tuesday, November 03, 2015 10:27 AM
> To: jigsaw-dev <jigsaw-dev at>
> Subject: Re: Question on Implied readability
> On 11/2/2015 3:32 PM, Ali Ebrahimi wrote:
> > On Tue, Nov 3, 2015 at 1:21 AM, Alan Bateman <Alan.Bateman at>
> > wrote:
> >
> >> On 02/11/2015 20:02, Ali Ebrahimi wrote:
> >> Thanks, I see the issue. The reason it didn't duplicate for me is
> >> because I hadn't dropped the requires
> >>
> >> So the bug is implied readability across layers when the same named
> >> module exists in multiple layers. In this case should read at 1.
> >> The (@2) is the same configuration as is confusing
> >> the code. We'll need to fix this.
> >>
> >> So, you say can not read and why?
> > Based on implied readability module implicitly reads,
> > in other word have requires; and because is
> > co-layer with, so module should reads
> > override for
> > How this specified in spec?
> It's currently underspecified in Configuration::resolve as "A readability graph is then constructed to take account of implicitly declared
> dependences (requires public)."
> We'll have to think about the implication of com.baz in layer1 sometimes offering a 'requires public' on in layer1, and
> sometimes offering a 'requires public' on in layer2, depending on who is reading com.baz in layer1.

Hi Alex

I don't think so. com.baz declares "requires public", so com.baz decide which is readable, in this case, decide which is used by
Consider the following scenario, which is the common usage of implied readability
com.baz provides the following service:
public Object1 getObject();
Object1 is a class defined in, please not at 2 is not visible to com.baz(indeed to avoid conflict, only one can be visible/readable to com.baz), so com.baz construct an Object1 of at 1 during getObject() is invoked, and then get this Object1 instance, now can only use type Object1 of at 1 to interpret it, who guarantee what Object1 of at 2 is?! So here the type must be definite, M2 requires public M1,  M3 requires M2, then which M1 is read by M2, which M1 must be readable to M3. It's not related to Layer actually.


> Alex

More information about the jigsaw-dev mailing list