equal
deleted
inserted
replaced
101 import jdk.internal.misc.SharedSecrets; |
101 import jdk.internal.misc.SharedSecrets; |
102 import jdk.internal.module.ConfigurableModuleFinder; |
102 import jdk.internal.module.ConfigurableModuleFinder; |
103 import jdk.internal.module.ConfigurableModuleFinder.Phase; |
103 import jdk.internal.module.ConfigurableModuleFinder.Phase; |
104 import jdk.internal.module.ModuleHashes; |
104 import jdk.internal.module.ModuleHashes; |
105 import jdk.internal.module.ModuleInfoExtender; |
105 import jdk.internal.module.ModuleInfoExtender; |
|
106 import jdk.tools.jlink.internal.Utils; |
106 |
107 |
107 import static java.util.stream.Collectors.joining; |
108 import static java.util.stream.Collectors.joining; |
108 |
109 |
109 /** |
110 /** |
110 * Implementation for the jmod tool. |
111 * Implementation for the jmod tool. |
1089 |
1090 |
1090 static class PathMatcherConverter implements ValueConverter<PathMatcher> { |
1091 static class PathMatcherConverter implements ValueConverter<PathMatcher> { |
1091 @Override |
1092 @Override |
1092 public PathMatcher convert(String pattern) { |
1093 public PathMatcher convert(String pattern) { |
1093 try { |
1094 try { |
1094 if (!pattern.startsWith("glob:") && |
1095 return Utils.getPathMatcher(FileSystems.getDefault(), pattern); |
1095 !pattern.startsWith("regex:")) { |
|
1096 pattern = "glob:" + pattern; |
|
1097 } |
|
1098 |
|
1099 return FileSystems.getDefault() |
|
1100 .getPathMatcher("glob:" + pattern); |
|
1101 } catch (PatternSyntaxException e) { |
1096 } catch (PatternSyntaxException e) { |
1102 throw new CommandException("err.bad.pattern", pattern); |
1097 throw new CommandException("err.bad.pattern", pattern); |
1103 } |
1098 } |
1104 } |
1099 } |
1105 |
1100 |