Skip to content

Commit

Permalink
Fix empty --patch-module command line entries
Browse files Browse the repository at this point in the history
When using an exclude filter, it is possible that the plugin creates
javadoc --patch-module command line options, that do not actually have
a value.

This changes skips such empty entries.
  • Loading branch information
hgschmie committed Aug 17, 2023
1 parent 72c8ee5 commit f7bfa53
Showing 1 changed file with 8 additions and 6 deletions.
Expand Up @@ -4594,12 +4594,14 @@ private void addJavadocOptions(
}

for (Entry<String, Collection<Path>> entry : patchModules.entrySet()) {
addArgIfNotEmpty(
arguments,
"--patch-module",
entry.getKey() + '=' + JavadocUtil.quotedPathArgument(getSourcePath(entry.getValue())),
false,
false);
if (!entry.getValue().isEmpty()) {
addArgIfNotEmpty(
arguments,
"--patch-module",
entry.getKey() + '=' + JavadocUtil.quotedPathArgument(getSourcePath(entry.getValue())),
false,
false);
}
}

if (doclet != null && !doclet.isEmpty()) {
Expand Down

0 comments on commit f7bfa53

Please sign in to comment.