You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by pk...@apache.org on 2023/10/18 13:33:33 UTC

[logging-log4j2] branch main updated: Add missing `trim()`

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

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


The following commit(s) were added to refs/heads/main by this push:
     new 1681eb0d91 Add missing `trim()`
1681eb0d91 is described below

commit 1681eb0d9117c3c424e378f3190dc20e506cdf15
Author: Piotr P. Karwasz <pi...@karwasz.org>
AuthorDate: Wed Oct 18 15:32:39 2023 +0200

    Add missing `trim()`
---
 .../appender/rolling/RollingAppenderDirectWriteWithHtmlLayoutTest.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/log4j-core-test/src/test/java/org/apache/logging/log4j/core/appender/rolling/RollingAppenderDirectWriteWithHtmlLayoutTest.java b/log4j-core-test/src/test/java/org/apache/logging/log4j/core/appender/rolling/RollingAppenderDirectWriteWithHtmlLayoutTest.java
index 23e87a4631..9df59cc78b 100644
--- a/log4j-core-test/src/test/java/org/apache/logging/log4j/core/appender/rolling/RollingAppenderDirectWriteWithHtmlLayoutTest.java
+++ b/log4j-core-test/src/test/java/org/apache/logging/log4j/core/appender/rolling/RollingAppenderDirectWriteWithHtmlLayoutTest.java
@@ -98,7 +98,7 @@ public class RollingAppenderDirectWriteWithHtmlLayoutTest {
             for (File file : files) {
                 if (!file.getName().startsWith(prefix))
                     continue;
-                final String data = Files.readString(file.toPath());
+                final String data = Files.readString(file.toPath()).trim();
                 // check that every file starts with the header
                 assertThat("header in file " + file, data, startsWith("<!DOCTYPE"));
                 assertThat("footer in file " + file, data, endsWith("</html>"));