Skip to content

Commit d8eadd2

Browse files
limvikjzheaux
authored andcommitted
Replace deprecated method
Replace HttpMethod.resolve() to HttpMethod.valueOf()
1 parent 7be710a commit d8eadd2

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

web/src/main/java/org/springframework/security/web/util/matcher/DispatcherTypeRequestMatcher.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2020 the original author or authors.
2+
* Copyright 2002-2023 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.
@@ -66,7 +66,7 @@ public DispatcherTypeRequestMatcher(DispatcherType dispatcherType, @Nullable Htt
6666
@Override
6767
public boolean matches(HttpServletRequest request) {
6868
if (this.httpMethod != null && StringUtils.hasText(request.getMethod())
69-
&& this.httpMethod != HttpMethod.resolve(request.getMethod())) {
69+
&& this.httpMethod != HttpMethod.valueOf(request.getMethod())) {
7070
return false;
7171
}
7272
return this.dispatcherType == request.getDispatcherType();

web/src/main/java/org/springframework/security/web/util/matcher/RegexRequestMatcher.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2016 the original author or authors.
2+
* Copyright 2002-2023 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.
@@ -116,7 +116,7 @@ public RegexRequestMatcher(String pattern, String httpMethod, boolean caseInsens
116116
@Override
117117
public boolean matches(HttpServletRequest request) {
118118
if (this.httpMethod != null && request.getMethod() != null
119-
&& this.httpMethod != HttpMethod.resolve(request.getMethod())) {
119+
&& this.httpMethod != HttpMethod.valueOf(request.getMethod())) {
120120
return false;
121121
}
122122
String url = request.getServletPath();

0 commit comments

Comments
 (0)