Skip to content

Commit ad82e8d

Browse files
committed
Merge pull request #15950 from michael-simons
* pr/15950: Prevent imports on org.testcontainers.shaded.* Polish "Stop using imports from shaded dependencies" Stop using imports from shaded dependencies
2 parents 90f059c + 10f58b3 commit ad82e8d

File tree

5 files changed

+13
-12
lines changed

5 files changed

+13
-12
lines changed

spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/security/oauth2/client/OAuth2ClientPropertiesRegistrationAdapterTests.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2018 the original author or authors.
2+
* Copyright 2012-2019 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -20,11 +20,12 @@
2020
import java.util.HashMap;
2121
import java.util.Map;
2222

23+
import com.fasterxml.jackson.core.JsonProcessingException;
24+
import com.fasterxml.jackson.databind.ObjectMapper;
2325
import okhttp3.mockwebserver.MockResponse;
2426
import okhttp3.mockwebserver.MockWebServer;
2527
import org.junit.After;
2628
import org.junit.Test;
27-
import org.testcontainers.shaded.com.fasterxml.jackson.databind.ObjectMapper;
2829

2930
import org.springframework.boot.autoconfigure.security.oauth2.client.OAuth2ClientProperties.Provider;
3031
import org.springframework.boot.autoconfigure.security.oauth2.client.OAuth2ClientProperties.Registration;
@@ -337,7 +338,7 @@ private void testOidcConfiguration(OAuth2ClientProperties.Registration registrat
337338
org.springframework.security.oauth2.core.AuthenticationMethod.HEADER);
338339
}
339340

340-
private void setupMockResponse(String issuer) throws Exception {
341+
private void setupMockResponse(String issuer) throws JsonProcessingException {
341342
MockResponse mockResponse = new MockResponse()
342343
.setResponseCode(HttpStatus.OK.value())
343344
.setBody(new ObjectMapper().writeValueAsString(getResponse(issuer)))

spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/security/oauth2/resource/reactive/ReactiveOAuth2ResourceServerAutoConfigurationTests.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2018 the original author or authors.
2+
* Copyright 2012-2019 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -21,12 +21,12 @@
2121
import java.util.Map;
2222
import java.util.stream.Stream;
2323

24+
import com.fasterxml.jackson.core.JsonProcessingException;
25+
import com.fasterxml.jackson.databind.ObjectMapper;
2426
import okhttp3.mockwebserver.MockResponse;
2527
import okhttp3.mockwebserver.MockWebServer;
2628
import org.junit.After;
2729
import org.junit.Test;
28-
import org.testcontainers.shaded.com.fasterxml.jackson.core.JsonProcessingException;
29-
import org.testcontainers.shaded.com.fasterxml.jackson.databind.ObjectMapper;
3030

3131
import org.springframework.boot.autoconfigure.AutoConfigurations;
3232
import org.springframework.boot.test.context.FilteredClassLoader;

spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/security/oauth2/resource/servlet/OAuth2ResourceServerAutoConfigurationTests.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2018 the original author or authors.
2+
* Copyright 2012-2019 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -22,12 +22,12 @@
2222

2323
import javax.servlet.Filter;
2424

25+
import com.fasterxml.jackson.core.JsonProcessingException;
26+
import com.fasterxml.jackson.databind.ObjectMapper;
2527
import okhttp3.mockwebserver.MockResponse;
2628
import okhttp3.mockwebserver.MockWebServer;
2729
import org.junit.After;
2830
import org.junit.Test;
29-
import org.testcontainers.shaded.com.fasterxml.jackson.core.JsonProcessingException;
30-
import org.testcontainers.shaded.com.fasterxml.jackson.databind.ObjectMapper;
3131

3232
import org.springframework.boot.autoconfigure.AutoConfigurations;
3333
import org.springframework.boot.test.context.FilteredClassLoader;

spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/servlet/WebMvcPropertiesTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2018 the original author or authors.
2+
* Copyright 2012-2019 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -19,8 +19,8 @@
1919
import java.util.Collections;
2020
import java.util.Map;
2121

22+
import org.assertj.core.util.Throwables;
2223
import org.junit.Test;
23-
import org.testcontainers.shaded.com.google.common.base.Throwables;
2424

2525
import org.springframework.boot.context.properties.bind.BindException;
2626
import org.springframework.boot.context.properties.bind.Bindable;

src/checkstyle/checkstyle.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
name="com.puppycrawl.tools.checkstyle.checks.imports.IllegalImportCheck">
88
<property name="regexp" value="true" />
99
<property name="illegalPkgs"
10-
value="^sun.*, ^org\.apache\.commons\.(?!compress|dbcp2|lang|lang3|logging|pool2).*, ^com\.google\.common.*, ^org\.flywaydb\.core\.internal.*" />
10+
value="^sun.*, ^org\.apache\.commons\.(?!compress|dbcp2|lang|lang3|logging|pool2).*, ^com\.google\.common.*, ^org\.flywaydb\.core\.internal.*, ^org\.testcontainers\.shaded.*" />
1111
<property name="illegalClasses"
1212
value="^reactor\.core\.support\.Assert, ^org\.junit\.rules\.ExpectedException, ^org\.slf4j\.LoggerFactory" />
1313
</module>

0 commit comments

Comments
 (0)