From b08b62f8de059d155dc05cea308dec0a0b2946b6 Mon Sep 17 00:00:00 2001 From: Karl Heinz Marbaise Date: Sat, 18 Nov 2023 14:15:19 +0100 Subject: [PATCH] [MNG-7940] - Maven embedder CLI output contains nulls. --- .../cli/CLIManagerDocumentationTest.java | 52 ++++++++++++++----- 1 file changed, 38 insertions(+), 14 deletions(-) diff --git a/maven-embedder/src/test/java/org/apache/maven/cli/CLIManagerDocumentationTest.java b/maven-embedder/src/test/java/org/apache/maven/cli/CLIManagerDocumentationTest.java index 2397f1fa0a..bae804f080 100644 --- a/maven-embedder/src/test/java/org/apache/maven/cli/CLIManagerDocumentationTest.java +++ b/maven-embedder/src/test/java/org/apache/maven/cli/CLIManagerDocumentationTest.java @@ -22,7 +22,6 @@ import java.io.File; import java.io.IOException; import java.util.ArrayList; import java.util.Collection; -import java.util.Collections; import java.util.Comparator; import java.util.List; @@ -30,6 +29,8 @@ import org.apache.commons.cli.Option; import org.apache.commons.io.FileUtils; import org.junit.jupiter.api.Test; +import static java.util.Objects.nonNull; + /** * Pseudo test to generate documentation fragment about supported CLI options. TODO such documentation generation code * should not be necessary as unit test but should be run during site generation (Velocity? Doxia macro?) @@ -48,27 +49,45 @@ class CLIManagerDocumentationTest { private static class CLIManagerExtension extends CLIManager { public Collection