From cd1e0e06c63cacc4d6ed89ed20e79203edfbdfd6 Mon Sep 17 00:00:00 2001 From: Thomas Darimont Date: Tue, 21 Nov 2023 12:45:58 +0100 Subject: [PATCH] Avoid deprecated API usage in testsuite/integration-arquillian/util (#24870) Signed-off-by: Thomas Darimont --- .../java/org/keycloak/testsuite/utils/fuse/FuseUtils.java | 5 +++-- .../testsuite/utils/undertow/UndertowDeployerHelper.java | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/testsuite/integration-arquillian/util/src/main/java/org/keycloak/testsuite/utils/fuse/FuseUtils.java b/testsuite/integration-arquillian/util/src/main/java/org/keycloak/testsuite/utils/fuse/FuseUtils.java index eb7e5633f2..8a44455c5c 100644 --- a/testsuite/integration-arquillian/util/src/main/java/org/keycloak/testsuite/utils/fuse/FuseUtils.java +++ b/testsuite/integration-arquillian/util/src/main/java/org/keycloak/testsuite/utils/fuse/FuseUtils.java @@ -40,7 +40,8 @@ import org.keycloak.testsuite.utils.arquillian.ContainerConstants; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.anyOf; import static org.hamcrest.Matchers.containsString; -import static org.hamcrest.Matchers.isEmptyString; +import static org.hamcrest.Matchers.emptyString; +import static org.hamcrest.Matchers.is; import static org.hamcrest.Matchers.not; public class FuseUtils { @@ -268,7 +269,7 @@ public class FuseUtils { private static Matcher resultToMatcher(Result result) { switch (result) { case EMPTY: - return isEmptyString(); + return is(emptyString()); case OK: return not(anyOf( containsString("Insufficient credentials"), diff --git a/testsuite/integration-arquillian/util/src/main/java/org/keycloak/testsuite/utils/undertow/UndertowDeployerHelper.java b/testsuite/integration-arquillian/util/src/main/java/org/keycloak/testsuite/utils/undertow/UndertowDeployerHelper.java index 2719624321..d8d71ed3f8 100644 --- a/testsuite/integration-arquillian/util/src/main/java/org/keycloak/testsuite/utils/undertow/UndertowDeployerHelper.java +++ b/testsuite/integration-arquillian/util/src/main/java/org/keycloak/testsuite/utils/undertow/UndertowDeployerHelper.java @@ -134,7 +134,7 @@ public class UndertowDeployerHelper { }); - return new URLResource(myResourceUrl, myResourceUrl.openConnection(), path); + return new URLResource(myResourceUrl, path); } }