Skip to content

Commit 000b87f

Browse files
Revert "Use Spring Framework version 6.0.0-M3"
This reverts commit b803e84.
1 parent 806e058 commit 000b87f

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
aspectjVersion=1.9.8
22
springJavaformatVersion=0.0.31
33
springBootVersion=2.4.2
4-
springFrameworkVersion=6.0.0-M3
4+
springFrameworkVersion=6.0.0-SNAPSHOT
55
openSamlVersion=3.4.6
66
version=6.0.0-SNAPSHOT
77
kotlinVersion=1.6.20-M1

oauth2/oauth2-client/src/main/java/org/springframework/security/oauth2/client/userinfo/DefaultReactiveOAuth2UserService.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828
import org.springframework.core.ParameterizedTypeReference;
2929
import org.springframework.http.HttpHeaders;
30-
import org.springframework.http.HttpStatus;
30+
import org.springframework.http.HttpStatusCode;
3131
import org.springframework.http.MediaType;
3232
import org.springframework.security.core.GrantedAuthority;
3333
import org.springframework.security.core.authority.SimpleGrantedAuthority;
@@ -108,7 +108,7 @@ public Mono<OAuth2User> loadUser(OAuth2UserRequest userRequest) throws OAuth2Aut
108108
authenticationMethod);
109109
// @formatter:off
110110
Mono<Map<String, Object>> userAttributes = requestHeadersSpec.retrieve()
111-
.onStatus(HttpStatus::isError, (response) ->
111+
.onStatus(HttpStatusCode::isError, (response) ->
112112
parse(response)
113113
.map((userInfoErrorResponse) -> {
114114
String description = userInfoErrorResponse.getErrorObject().getDescription();

oauth2/oauth2-client/src/test/java/org/springframework/security/oauth2/client/http/OAuth2ErrorResponseErrorHandlerTests.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
import org.springframework.mock.http.client.MockClientHttpResponse;
2929
import org.springframework.security.oauth2.core.OAuth2AuthorizationException;
3030
import org.springframework.security.oauth2.core.OAuth2Error;
31-
import org.springframework.web.client.UnknownHttpStatusCodeException;
3231

3332
import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
3433
import static org.mockito.ArgumentMatchers.any;
@@ -102,8 +101,9 @@ public void handleErrorWhenErrorResponseWithInvalidWwwAuthenticateHeaderThenHand
102101
@Test
103102
public void handleErrorWhenErrorResponseWithInvalidStatusCodeThenHandled() {
104103
CustomMockClientHttpResponse response = new CustomMockClientHttpResponse(new byte[0], 596);
105-
assertThatExceptionOfType(UnknownHttpStatusCodeException.class)
106-
.isThrownBy(() -> this.errorHandler.handleError(response)).withMessage("596 : [no body]");
104+
assertThatExceptionOfType(IllegalArgumentException.class)
105+
.isThrownBy(() -> this.errorHandler.handleError(response))
106+
.withMessage("No matching constant for [596]");
107107
}
108108

109109
private static final class CustomMockClientHttpResponse extends MockHttpInputMessage implements ClientHttpResponse {

oauth2/oauth2-client/src/test/java/org/springframework/security/oauth2/client/web/server/DefaultServerOAuth2AuthorizationRequestResolverTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ public void resolveWhenClientRegistrationNotFoundMatchThenBadRequest() {
8181
given(this.clientRegistrationRepository.findByRegistrationId(any())).willReturn(Mono.empty());
8282
assertThatExceptionOfType(ResponseStatusException.class)
8383
.isThrownBy(() -> resolve("/oauth2/authorization/not-found-id"))
84-
.satisfies((ex) -> assertThat(ex.getStatus()).isEqualTo(HttpStatus.BAD_REQUEST));
84+
.satisfies((ex) -> assertThat(ex.getStatusCode()).isEqualTo(HttpStatus.BAD_REQUEST));
8585
}
8686

8787
@Test

web/src/test/java/org/springframework/security/web/util/matcher/AntPathRequestMatcherTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,10 +93,10 @@ public void nontrailingWildcardWithVariableMatchesCorrectly() {
9393
AntPathRequestMatcher matcher = new AntPathRequestMatcher("/**/{id}");
9494
assertThat(matcher.matches(createRequest("/blah/1234"))).isTrue();
9595
assertThat(matcher.matches(createRequest("/bleh/4567"))).isTrue();
96-
assertThat(matcher.matches(createRequest("/paskos/blah/"))).isTrue();
96+
assertThat(matcher.matches(createRequest("/paskos/blah/"))).isFalse();
9797
assertThat(matcher.matches(createRequest("/12345/blah/xxx"))).isTrue();
9898
assertThat(matcher.matches(createRequest("/12345/blaha"))).isTrue();
99-
assertThat(matcher.matches(createRequest("/paskos/bleh/"))).isTrue();
99+
assertThat(matcher.matches(createRequest("/paskos/bleh/"))).isFalse();
100100
}
101101

102102
@Test

0 commit comments

Comments
 (0)