From a5a8327a1e487b10b0b64a28058c91b89b7511d0 Mon Sep 17 00:00:00 2001 From: Jan Bartel Date: Tue, 12 Jan 2021 17:48:37 +0100 Subject: [PATCH] Issue #5684 Fix testSetBadBoolean and remove @Disabled (#5875) Signed-off-by: Jan Bartel --- .../java/org/eclipse/jetty/xml/XmlConfigurationTest.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/jetty-xml/src/test/java/org/eclipse/jetty/xml/XmlConfigurationTest.java b/jetty-xml/src/test/java/org/eclipse/jetty/xml/XmlConfigurationTest.java index 280f64467b9f..4c2e0ad8b81d 100644 --- a/jetty-xml/src/test/java/org/eclipse/jetty/xml/XmlConfigurationTest.java +++ b/jetty-xml/src/test/java/org/eclipse/jetty/xml/XmlConfigurationTest.java @@ -1046,7 +1046,6 @@ public void testSetBooleanFalse() throws Exception } @Test - @Disabled public void testSetBadBoolean() throws Exception { XmlConfiguration xmlConfiguration = asXmlConfiguration( @@ -1054,8 +1053,10 @@ public void testSetBadBoolean() throws Exception " tru" + ""); + //Any string other than "true" (case insensitive) will be false + //according to Boolean constructor. NativeHolder bh = (NativeHolder)xmlConfiguration.configure(); - assertTrue(bh.getBoolean(), "boolean['tru']"); + assertFalse(bh.getBoolean(), "boolean['tru']"); } @Test