This is an automated email from the ASF dual-hosted git repository.

vy pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/logging-log4j-tools.git

commit c18e5ac6d0ccc82a6dad11c185c40ac0eaec2d2f
Author: Volkan Yazıcı <[email protected]>
AuthorDate: Mon Mar 11 21:50:58 2024 +0100

    Fix Error Prone warning in `DocumentationGeneratorTest`
---
 .../logging/log4j/docgen/generator/DocumentationGeneratorTest.java   | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git 
a/log4j-docgen/src/test/java/org/apache/logging/log4j/docgen/generator/DocumentationGeneratorTest.java
 
b/log4j-docgen/src/test/java/org/apache/logging/log4j/docgen/generator/DocumentationGeneratorTest.java
index d48712a..44d07d6 100644
--- 
a/log4j-docgen/src/test/java/org/apache/logging/log4j/docgen/generator/DocumentationGeneratorTest.java
+++ 
b/log4j-docgen/src/test/java/org/apache/logging/log4j/docgen/generator/DocumentationGeneratorTest.java
@@ -23,7 +23,6 @@ import static 
org.apache.logging.log4j.tools.internal.test.util.FileTestUtils.as
 import java.nio.file.Path;
 import java.nio.file.Paths;
 import java.util.Set;
-import java.util.function.Predicate;
 import org.apache.logging.log4j.docgen.PluginSet;
 import org.junit.jupiter.api.Test;
 import org.junit.jupiter.api.io.CleanupMode;
@@ -34,8 +33,6 @@ class DocumentationGeneratorTest {
     private static final String TEST_CLASS_RESOURCE_PATH =
             "src/test/resources/" + 
DocumentationGeneratorTest.class.getSimpleName();
 
-    private static final Predicate<String> CLASS_NAME_MATCHER = className -> 
!className.startsWith("java.");
-
     @Test
     void simple_should_work(@TempDir(cleanup = CleanupMode.ON_SUCCESS) final 
Path outputDir) {
         final PluginSet pluginSet = readDescriptor(TEST_CLASS_RESOURCE_PATH + 
"/simple/plugins.xml");
@@ -59,7 +56,7 @@ class DocumentationGeneratorTest {
         final Path templateDirectory = Paths.get(TEST_CLASS_RESOURCE_PATH + 
"/templates");
         final DocumentationGeneratorArgs generatorArgs = new 
DocumentationGeneratorArgs(
                 pluginSets,
-                CLASS_NAME_MATCHER,
+                className -> !className.startsWith("java."),
                 templateDirectory,
                 new DocumentationTemplate(
                         "index.adoc.ftl", 
outputDir.resolve("index.adoc").toString()),

Reply via email to