RFR: JDK-8158402 - jlink: should use regex for all pattern operations (--order-resources or --exclude-resources)
Chris Hegarty
chris.hegarty at oracle.com
Thu Jun 9 11:52:14 UTC 2016
> On 9 Jun 2016, at 11:16, Alan Bateman <Alan.Bateman at oracle.com> wrote:
>
> On 08/06/2016 20:45, Jim Laskey (Oracle) wrote:
>
>> Consistent use of PathPatterns for jlink, jimage and jmod options.
>>
>> —optionName=(regex:|glob:|<nil>)<pattern> ?? where <nil><pattern> => glob:<pattern>
>>
>> http://cr.openjdk.java.net/~jlaskey/8158402/webrev/index.html <http://cr.openjdk.java.net/~jlaskey/8158402/webrev/index.html>
>> https://bugs.openjdk.java.net/browse/JDK-8158402 <https://bugs.openjdk.java.net/browse/JDK-8158402>
>>
> This look okay to me but two questions:
>
> 1. Do any of the usage resources need to be updated?
>
> 2. Does this introduce an inconsistency in the jmod tool in that --hash-modules takes a regex whereas --exclude takes a pattern that is a glob (at least by default, it could be a regex too if prefixed with "regex:").
As things currently stand --hash-modules accepts a regex, and --exclude
accepts a glob. So this change does not affect default behaviour.
It makes sense for --exclude to take a glob ( and optionally a regex ).
I don’t think it makes sense for --hash-modules to take anything other
than a regex.
Are there issues with this?
Jim, can you please rename GlobConverter to PatternConverter or ExcludeConverter,
or similar.
-Chris.
More information about the jigsaw-dev
mailing list