Non-interference (was: Re: Module-system requirements)

Tim Ellison Tim_Ellison at uk.ibm.com
Mon Feb 16 17:04:01 UTC 2015


mark.reinhold at oracle.com wrote on 16/02/2015 01:25:07:
> 2015/2/13 6:06 -0800, tim_ellison at uk.ibm.com:
> <snip>
> >> Non-interference — The Java compiler, virtual machine, and run-time
> >> system must ensure that modules that contain packages of the same
> >> name do not interfere with each other.
> > 
> > Can you explain "interfere"?  Is this referring to ambiguous class and 

> > linkage error type problems, or something else here?
> 
> The former.  If two distinct modules contain packages of the same name
> then code in that package in one module must not be able to access
> package-private types or members in that package in the other module.
> If two distinct modules contain classes of the same name (i.e., with the
> same binary name) then one must not be able to stand in for the other.

Ok, so the module name partitions the package name space.

Consider the following change for the Exports fundamental definition:

  Exports — A module’s definition must be able to indicate which
  of its packages are exported for use by other modules, and which
  are not.  Multiple modules may export packages of the same name.

Regards,
Tim

Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number 
741598. 
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU



More information about the jpms-spec-experts mailing list