JPMS Module Path question

Alex Buckley alex.buckley at oracle.com
Mon Jun 19 19:22:33 UTC 2017


On 6/17/2017 3:48 AM, Peter Kriens wrote:
>> On 16 Jun 2017, at 22:02, Alex Buckley <alex.buckley at oracle.com> wrote:
>> On 6/15/2017 11:55 PM, Peter Kriens wrote:
>>> In the current summary in http://cr.openjdk.java.net/~mr/jigsaw/spec/lang-vm.html (which I understand was pat of the input to the vote), the following things were wrong:
>>> 	* Grammar (package declaration allowed together with a module declaration), and
>> As I said earlier in this thread, I don't understand this comment. Where is a package declaration allowed with a module declaration in:
>>
>> CompilationUnit:
>>   [PackageDeclaration] {ImportDeclaration} {TypeDeclaration}
>>   {ImportDeclaration} ModuleDeclaration
>> ?  The definition of CompilationUnit has been refactored since publication of this lang-vm.html file, but the language accepted by CompilationUnit has not changed.
>
> As you said, in the latest draft this is corrected but it is imho therefore still [wrong] in the current lang-vm.html file? I.e. in lang-vm it still allows:
>
> 	package foo;
> 	module foo {}

lang-vm does not allow this and has never allowed it. The 
CompilationUnit production that is presented above has two alternatives. 
The first alternative accepts:

package ...
import ...
class ...

The second alternative accepts:

import ...
module ...

Alex


More information about the jpms-spec-observers mailing list