version omitted

Jonathan Gibbons Jonathan.Gibbons at Sun.COM
Tue Dec 15 14:34:50 PST 2009


Jonathan Gibbons wrote:
> Jigsaw folk,
>
> If a version is omitted from a module-info file, whose job is it to 
> determine a default, and if it is javac's job, what should the default 
> be?
>
> -- Jon

Currently, if a version number is missing from a query, you get the 
following exception:

java.lang.IllegalArgumentException: m1: Version does not start with a number
    at org.openjdk.jigsaw.JigsawVersion.<init>(JigsawVersion.java:108)
    at 
org.openjdk.jigsaw.JigsawVersionQuery.<init>(JigsawVersionQuery.java:113)
    at 
org.openjdk.jigsaw.JigsawModuleSystem.parseVersionQuery(JigsawModuleSystem.java:46)
    at 
java.lang.module.ModuleSystem.parseModuleIdQuery(ModuleSystem.java:82)
    at 
com.sun.tools.javac.jigsaw.JigsawModuleResolver.resolve(JigsawModuleResolver.java:104)


If an exception is the appropriate behavior, then the detail message 
could be more helpful (No version given) but it would be more helpful to 
allow a missing version.

-- Jon



More information about the jigsaw-dev mailing list