Skip to content

Commit 5609626

Browse files
Remove BlockHound dependency
The dependency is not needed anymore and there is a issue when using OpenJDK 13 or higher reactor/BlockHound#33 Issue gh-10343
1 parent 514558d commit 5609626

File tree

2 files changed

+0
-20
lines changed

2 files changed

+0
-20
lines changed

dependencies/spring-security-dependencies.gradle

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ dependencies {
2727
api "commons-collections:commons-collections:3.2.2"
2828
api "commons-logging:commons-logging:1.2"
2929
api "io.mockk:mockk:1.12.0"
30-
api "io.projectreactor.tools:blockhound:1.0.6.RELEASE"
3130
api "javax.annotation:jsr250-api:1.0"
3231
api "javax.servlet.jsp.jstl:javax.servlet.jsp.jstl-api:1.2.2"
3332
api "javax.servlet.jsp:javax.servlet.jsp-api:2.3.3"

oauth2/oauth2-client/src/test/java/org/springframework/security/oauth2/client/web/reactive/function/client/ServletOAuth2AuthorizedClientExchangeFilterFunctionITests.java

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,9 @@
2929
import okhttp3.mockwebserver.MockResponse;
3030
import okhttp3.mockwebserver.MockWebServer;
3131
import org.junit.jupiter.api.AfterEach;
32-
import org.junit.jupiter.api.BeforeAll;
3332
import org.junit.jupiter.api.BeforeEach;
3433
import org.junit.jupiter.api.Test;
3534
import org.mockito.ArgumentCaptor;
36-
import reactor.blockhound.BlockHound;
3735
import reactor.util.context.Context;
3836

3937
import org.springframework.http.HttpHeaders;
@@ -89,23 +87,6 @@ public class ServletOAuth2AuthorizedClientExchangeFilterFunctionITests {
8987

9088
private MockHttpServletResponse response;
9189

92-
@BeforeAll
93-
public static void setUpBlockingChecks() {
94-
// IMPORTANT:
95-
// Before enabling BlockHound, we need to white-list
96-
// `java.lang.Class.getPackage()`.
97-
// When the JVM loads `java.lang.Package.getSystemPackage()`, it attempts to
98-
// `java.lang.Package.loadManifest()` which is blocking I/O and triggers
99-
// BlockHound to error.
100-
// NOTE: This is an issue with JDK 8. It's been tested on JDK 10 and works fine
101-
// w/o this white-list.
102-
// @formatter:off
103-
BlockHound.builder()
104-
.allowBlockingCallsInside(Class.class.getName(), "getPackage")
105-
.install();
106-
// @formatter:on
107-
}
108-
10990
@BeforeEach
11091
public void setUp() throws Exception {
11192
this.clientRegistrationRepository = mock(ClientRegistrationRepository.class);

0 commit comments

Comments
 (0)