hg: jigsaw/jake/langtools: support module files directly on file manager module paths
Robert Scholte
rfscholte at apache.org
Mon Feb 8 19:46:55 UTC 2016
Hi Jon,
thanks, I'll give it a try with the next jigsaw-ea.
I also noticed the following change below.
IIRC a .zip file was considered a valid file extension for classpath
entries (even though we still don't support it with Maven). Is the zip
file dropped in case of modules?
thanks,
Robert
2.30
+ private void checkValidModulePathEntry(Path p) {
2.31
+ if (Files.isDirectory(p)) {
2.32
+ // either an exploded module or a directory of modules
2.33
+ return;
2.34
+ }
2.35
+
2.36
+ String name = p.getFileName().toString();
2.37
+ int lastDot = name.lastIndexOf(".");
2.38
+ if (lastDot > 0) {
2.39
+ switch (name.substring(lastDot)) {
2.40
+ case ".jar":
2.41
+ case ".jmod":
2.42
+ return;
2.43
+ }
2.44
+ }
2.45
+ throw new IllegalArgumentException(p.toString());
2.46
+ }
Op Mon, 08 Feb 2016 03:58:37 +0100 schreef Jonathan Gibbons
<jonathan.gibbons at oracle.com>:
> Hi Robert,
>
> Thanks for the report. This should now have been addressed by
> http://hg.openjdk.java.net/jigsaw/jake/langtools/rev/719a1da641c7
>
> -- Jon
>
>
> On 02/03/2016 09:38 AM, Robert Scholte wrote:
>> Hi Jonathan,
>>
>> it seems like this change is not enough, see:
>> Locations.ModulePathLocationHandler::setPaths
>>
>> 910
>> @Override
>> 911
>> void setPaths(Iterable<? extends Path> paths) {
>> 912
>> if (paths != null) {
>> 913
>> for (Path p: paths) {
>> 914
>> if (!Files.isDirectory(p))
>> 915
>> throw new
>> IllegalArgumentException(p.toString());
>> 916
>> }
>> 917
>> }
>> 918
>> super.setPaths(paths);
>> 919
>> }
>>
>> I still got the IAE.
>>
>> thanks,
>> Robert
>>
>>
>> Op Thu, 21 Jan 2016 02:59:30 +0100 schreef
>> <jonathan.gibbons at oracle.com>:
>>
>>> Changeset: 546b5fa35f9a
>>> Author: jjg
>>> Date: 2016-01-20 17:58 -0800
>>> URL: http://hg.openjdk.java.net/jigsaw/jake/langtools/rev/546b5fa35f9a
>>>
>>> support module files directly on file manager module paths
>>>
>>> !
>>> src/jdk.compiler/share/classes/com/sun/tools/javac/file/Locations.java
More information about the jigsaw-dev
mailing list