Module naming restrictions

Remi Forax forax at univ-mlv.fr
Tue Apr 25 07:50:55 UTC 2017


Seems to be a bug to me.

Rémi

----- Mail original -----
> De: "Rafael Winterhalter" <rafael.wth at gmail.com>
> À: "jigsaw-dev" <jigsaw-dev at openjdk.java.net>
> Envoyé: Mardi 25 Avril 2017 09:12:04
> Objet: Module naming restrictions

> Hello,
> 
> I did another update of my libraries to support Java 9 and found out that
> Byte Buddy cannot easily be used as an automatic module. It is published as
> byte-buddy.jar to Maven Central where its automatic module name would be
> byte.buddy. This does however not compile due to "byte" being a keyword in
> Java. Here is what javac gives me:
> 
> src/module-info.java:2: error: <identifier> expected
>    requires byte.buddy;
>            ^
> 1 error
> 
> I expect that this is not a common problem but not an uncommon one either.
> Looking for artifacts named after Java keywords in Maven Central, you can
> find quite a few.
> 
> I do not know if this is technically feasible but I suggest that module
> names should not come with any restrictions due to the historic freedom in
> naming which would just cause confusion if some projects had to be renamed
> just to satisfy the module descriptors restrictions.
> 
> Best regards, Rafael


More information about the jigsaw-dev mailing list