-
Notifications
You must be signed in to change notification settings - Fork 812
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WW-5383] Updates RegEx to excludes JARs by default #830
Conversation
&& (alwaysMapExecute || map.isEmpty())) { | ||
&& hasDefaultMethod | ||
&& actionAnnotation == null && actionsAnnotation == null | ||
&& (alwaysMapExecute || map.isEmpty())) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My personal preference is to use double indents for continuations - it avoids situations like these where the guard blends in with the following code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm using standard IDEA settings, yet it would be good to introduce a common IDE independent mechanism to format code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMHO Eclipse does this by default, IntelliJ not.
We could introduce .editorconfig
settings. The following setting does the job:
[*.java]
continuation_indent_size = 8
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, right! Just checked my settings and it was 4 for continuation, reverted to default one :)
* can return also a sub-path like "!/META-INF/versions/..." | ||
*/ | ||
private static final String EXCLUDE_ALL_JARS_PATTERN = ".*?\\.jar(!/|/)?(.*)?"; | ||
private static final String DEFAULT_SPLIT_PATTERN = "\\s*,\\s*"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good without the original [,]
👍
} | ||
urlSet = urlSet.excludePaths(System.getProperty("sun.boot.class.path", "")); | ||
urlSet = urlSet.exclude(".*/JavaVM.framework/.*"); | ||
|
||
if (includeJars == null) { | ||
urlSet = urlSet.exclude(".*?\\.jar(!/|/)?"); | ||
LOG.debug("\"{}\" is not defined, excluding all JAR files!", ConventionConstants.CONVENTION_ACTION_INCLUDE_JARS); | ||
urlSet = urlSet.exclude(EXCLUDE_ALL_JARS_PATTERN); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess the extra (.*)?
from EXCLUDE_ALL_JARS_PATTERN = ".*?\\.jar(!/|/)?(.*)?";
is intentional, isn't it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, since JDK9 we can get either jar:file:/.../org/codehaus/plexus/plexus-utils/3.4.1/plexus-utils-3.4.1.jar!/META-INF/versions/10/
or just jar:file:/.../org/codehaus/plexus/plexus-utils/3.4.1/plexus-utils-3.4.1.jar!/
151970a
to
cc78033
Compare
Quality Gate failedFailed conditions 1 Security Hotspot |
Closes WW-5383