Discussion:
RFR 8194922: jlink --exclude-resources should never exclude module-info.class
Sundararajan Athijegannathan
2018-02-19 16:12:25 UTC
Permalink
Please review.

Webrev: http://cr.openjdk.java.net/~sundar/8194922/webrev.00/
Bug: https://bugs.openjdk.java.net/browse/JDK-8194922

Thanks
-Sundar
Alan Bateman
2018-02-19 16:22:56 UTC
Permalink
Post by Sundararajan Athijegannathan
Please review.
Webrev: http://cr.openjdk.java.net/~sundar/8194922/webrev.00/
Bug: https://bugs.openjdk.java.net/browse/JDK-8194922
I assume it should be testing the resource name with equals rather than
endsWith. I also wonder if jlink should fail for this case as it means
the jlink user has specified the wrong path to --exclude-resources.

JDK_8194922_Test.java needs a better name to be consistent with the
tests in this area.

-Alan
Sundararajan Athijegannathan
2018-02-20 08:08:49 UTC
Permalink
Updated: http://cr.openjdk.java.net/~sundar/8194922/webrev.01/

* replaced endsWith with equals on $MODULE/module-info.class
* jlink shows warning when module-info.class is not included (but
implied to be excluded by --exclude-resources pattern)
* Renamed the test.

Thanks,
-Sundar
Post by Alan Bateman
Post by Sundararajan Athijegannathan
Please review.
Webrev: http://cr.openjdk.java.net/~sundar/8194922/webrev.00/
Bug: https://bugs.openjdk.java.net/browse/JDK-8194922
I assume it should be testing the resource name with equals rather
than endsWith. I also wonder if jlink should fail for this case as it
means the jlink user has specified the wrong path to --exclude-resources.
JDK_8194922_Test.java needs a better name to be consistent with the
tests in this area.
-Alan
Alan Bateman
2018-02-20 09:24:52 UTC
Permalink
Post by Sundararajan Athijegannathan
Updated: http://cr.openjdk.java.net/~sundar/8194922/webrev.01/
* replaced endsWith with equals on $MODULE/module-info.class
* jlink shows warning when module-info.class is not included (but
implied to be excluded by --exclude-resources pattern)
* Renamed the test.
Thinking about more, it might be better for this to be an error rather
than a warning so the jlink user fixes the filter. The test changes look
good.

-Alan
Sundararajan Athijegannathan
2018-02-20 09:50:49 UTC
Permalink
Throwing exception now ->
http://cr.openjdk.java.net/~sundar/8194922/webrev.02/

Thanks
-Sundar
Post by Alan Bateman
Post by Sundararajan Athijegannathan
Updated: http://cr.openjdk.java.net/~sundar/8194922/webrev.01/
* replaced endsWith with equals on $MODULE/module-info.class
* jlink shows warning when module-info.class is not included (but
implied to be excluded by --exclude-resources pattern)
* Renamed the test.
Thinking about more, it might be better for this to be an error rather
than a warning so the jlink user fixes the filter. The test changes
look good.
-Alan
Alan Bateman
2018-02-20 09:51:43 UTC
Permalink
Post by Sundararajan Athijegannathan
Throwing exception now ->
http://cr.openjdk.java.net/~sundar/8194922/webrev.02/
This looks good to me.

-Alan
mandy chung
2018-02-20 18:33:51 UTC
Permalink
Looks good.  I agree that this should be an error when excluding module
declaration. Mandy
Post by Sundararajan Athijegannathan
Throwing exception now ->
http://cr.openjdk.java.net/~sundar/8194922/webrev.02/
Thanks
-Sundar
Post by Alan Bateman
Post by Sundararajan Athijegannathan
Updated: http://cr.openjdk.java.net/~sundar/8194922/webrev.01/
* replaced endsWith with equals on $MODULE/module-info.class
* jlink shows warning when module-info.class is not included (but
implied to be excluded by --exclude-resources pattern)
* Renamed the test.
Thinking about more, it might be better for this to be an error
rather than a warning so the jlink user fixes the filter. The test
changes look good.
-Alan
Loading...