elharo commented on code in PR #157:
URL:
https://github.com/apache/maven-jarsigner-plugin/pull/157#discussion_r3838411288
##########
src/main/java/org/apache/maven/plugins/jarsigner/AbstractJarsignerMojo.java:
##########
@@ -334,8 +336,12 @@ private List<File> findJarfiles() throws
MojoExecutionException {
}
if (archiveDirectory != null) {
- String includeList = (includes != null) ?
StringUtils.join(includes, ",") : null;
- String excludeList = (excludes != null) ?
StringUtils.join(excludes, ",") : null;
+ String includeList = (includes != null)
+ ?
Arrays.stream(includes).filter(Objects::nonNull).collect(Collectors.joining(","))
Review Comment:
This is vastly too complex. Redo without lambdas or ternary operators.
##########
src/test/java/org/apache/maven/plugins/jarsigner/JarsignerVerifyMojoTest.java:
##########
@@ -166,4 +167,24 @@ public void testErrorWhenNotSignedOnNonExistingSigning()
throws Exception {
mojoException.getMessage(),
containsString(mainArtifact.getFile().getPath()));
}
+
+ /** Includes with null elements should not cause NPE in String.join
replacement */
Review Comment:
delete "https://github.com/apache/maven-jarsigner/issues/47" and add period
at end
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]