From 560962649e26513a561ff1185237b180e1f37261 Mon Sep 17 00:00:00 2001 From: Marcus Da Coregio Date: Thu, 7 Oct 2021 09:25:16 -0300 Subject: [PATCH] Remove BlockHound dependency The dependency is not needed anymore and there is a issue when using OpenJDK 13 or higher https://github.com/reactor/BlockHound/issues/33 Issue gh-10343 --- .../spring-security-dependencies.gradle | 1 - ...zedClientExchangeFilterFunctionITests.java | 19 ------------------- 2 files changed, 20 deletions(-) diff --git a/dependencies/spring-security-dependencies.gradle b/dependencies/spring-security-dependencies.gradle index b2cc1be458d..5729216dd61 100644 --- a/dependencies/spring-security-dependencies.gradle +++ b/dependencies/spring-security-dependencies.gradle @@ -27,7 +27,6 @@ dependencies { api "commons-collections:commons-collections:3.2.2" api "commons-logging:commons-logging:1.2" api "io.mockk:mockk:1.12.0" - api "io.projectreactor.tools:blockhound:1.0.6.RELEASE" api "javax.annotation:jsr250-api:1.0" api "javax.servlet.jsp.jstl:javax.servlet.jsp.jstl-api:1.2.2" api "javax.servlet.jsp:javax.servlet.jsp-api:2.3.3" diff --git a/oauth2/oauth2-client/src/test/java/org/springframework/security/oauth2/client/web/reactive/function/client/ServletOAuth2AuthorizedClientExchangeFilterFunctionITests.java b/oauth2/oauth2-client/src/test/java/org/springframework/security/oauth2/client/web/reactive/function/client/ServletOAuth2AuthorizedClientExchangeFilterFunctionITests.java index d0a0b8e7308..095af52c50d 100644 --- a/oauth2/oauth2-client/src/test/java/org/springframework/security/oauth2/client/web/reactive/function/client/ServletOAuth2AuthorizedClientExchangeFilterFunctionITests.java +++ b/oauth2/oauth2-client/src/test/java/org/springframework/security/oauth2/client/web/reactive/function/client/ServletOAuth2AuthorizedClientExchangeFilterFunctionITests.java @@ -29,11 +29,9 @@ import okhttp3.mockwebserver.MockResponse; import okhttp3.mockwebserver.MockWebServer; import org.junit.jupiter.api.AfterEach; -import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.mockito.ArgumentCaptor; -import reactor.blockhound.BlockHound; import reactor.util.context.Context; import org.springframework.http.HttpHeaders; @@ -89,23 +87,6 @@ public class ServletOAuth2AuthorizedClientExchangeFilterFunctionITests { private MockHttpServletResponse response; - @BeforeAll - public static void setUpBlockingChecks() { - // IMPORTANT: - // Before enabling BlockHound, we need to white-list - // `java.lang.Class.getPackage()`. - // When the JVM loads `java.lang.Package.getSystemPackage()`, it attempts to - // `java.lang.Package.loadManifest()` which is blocking I/O and triggers - // BlockHound to error. - // NOTE: This is an issue with JDK 8. It's been tested on JDK 10 and works fine - // w/o this white-list. - // @formatter:off - BlockHound.builder() - .allowBlockingCallsInside(Class.class.getName(), "getPackage") - .install(); - // @formatter:on - } - @BeforeEach public void setUp() throws Exception { this.clientRegistrationRepository = mock(ClientRegistrationRepository.class);