diff --git a/log4j-core-test/src/test/java/org/apache/logging/log4j/core/layout/XmlLayoutTest.java b/log4j-core-test/src/test/java/org/apache/logging/log4j/core/layout/XmlLayoutTest.java index db755ae2bf6..0f246d28389 100644 --- a/log4j-core-test/src/test/java/org/apache/logging/log4j/core/layout/XmlLayoutTest.java +++ b/log4j-core-test/src/test/java/org/apache/logging/log4j/core/layout/XmlLayoutTest.java @@ -16,10 +16,12 @@ */ package org.apache.logging.log4j.core.layout; +import static org.hamcrest.MatcherAssert.assertThat; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNull; import static org.junit.Assert.assertTrue; +import static org.xmlunit.matchers.HasXPathMatcher.hasXPath; import com.fasterxml.jackson.core.JsonParseException; import com.fasterxml.jackson.databind.JsonMappingException; @@ -332,8 +334,9 @@ public void testAdditionalFields() { .setConfiguration(ctx.getConfiguration()) .build(); final String str = layout.toSerializable(LogEventFixtures.createLogEvent()); - assertTrue(str, str.contains("VALUE1")); - assertTrue(str, str.contains("" + new JavaLookup().getRuntime() + "")); + + assertThat(str, hasXPath("//KEY1[text()='VALUE1']")); + assertThat(str, hasXPath("//KEY2[text()='" + new JavaLookup().getRuntime() + "']")); } @Test diff --git a/log4j-parent/pom.xml b/log4j-parent/pom.xml index 406c3108a1a..049ec065e85 100644 --- a/log4j-parent/pom.xml +++ b/log4j-parent/pom.xml @@ -87,7 +87,7 @@ 3.0 2.2.2 2.7.4 - 2.18.3 + 2.19.0 2.1.3 2.1.3 diff --git a/pom.xml b/pom.xml index d634c889dab..3de3452381d 100644 --- a/pom.xml +++ b/pom.xml @@ -345,7 +345,7 @@ 1.2.21 4.0.0 1.11.0 - 2.18.3 + 2.19.0 1.6.2 4.0.5 18.3.12 diff --git a/src/changelog/.2.x.x/update_com_fasterxml_jackson_jackson_bom.xml b/src/changelog/.2.x.x/update_com_fasterxml_jackson_jackson_bom.xml index 6644800102b..73d0af758cc 100644 --- a/src/changelog/.2.x.x/update_com_fasterxml_jackson_jackson_bom.xml +++ b/src/changelog/.2.x.x/update_com_fasterxml_jackson_jackson_bom.xml @@ -3,6 +3,6 @@ xmlns="https://logging.apache.org/xml/ns" xsi:schemaLocation="https://logging.apache.org/xml/ns https://logging.apache.org/xml/ns/log4j-changelog-0.xsd" type="updated"> - - Update `com.fasterxml.jackson:jackson-bom` to version `2.18.3` + + Update `com.fasterxml.jackson:jackson-bom` to version `2.19.0`