From d8eadd2207ee981dd8c0047b79ba4ffa4e2db486 Mon Sep 17 00:00:00 2001 From: Seongguk Jeong Date: Tue, 15 Aug 2023 01:33:37 +0900 Subject: [PATCH] Replace deprecated method Replace HttpMethod.resolve() to HttpMethod.valueOf() --- .../web/util/matcher/DispatcherTypeRequestMatcher.java | 4 ++-- .../security/web/util/matcher/RegexRequestMatcher.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/web/src/main/java/org/springframework/security/web/util/matcher/DispatcherTypeRequestMatcher.java b/web/src/main/java/org/springframework/security/web/util/matcher/DispatcherTypeRequestMatcher.java index 9b0b5ba184..5df416c919 100644 --- a/web/src/main/java/org/springframework/security/web/util/matcher/DispatcherTypeRequestMatcher.java +++ b/web/src/main/java/org/springframework/security/web/util/matcher/DispatcherTypeRequestMatcher.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2020 the original author or authors. + * Copyright 2002-2023 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -66,7 +66,7 @@ public class DispatcherTypeRequestMatcher implements RequestMatcher { @Override public boolean matches(HttpServletRequest request) { if (this.httpMethod != null && StringUtils.hasText(request.getMethod()) - && this.httpMethod != HttpMethod.resolve(request.getMethod())) { + && this.httpMethod != HttpMethod.valueOf(request.getMethod())) { return false; } return this.dispatcherType == request.getDispatcherType(); diff --git a/web/src/main/java/org/springframework/security/web/util/matcher/RegexRequestMatcher.java b/web/src/main/java/org/springframework/security/web/util/matcher/RegexRequestMatcher.java index 0de0dd54e6..01e0d6be8a 100644 --- a/web/src/main/java/org/springframework/security/web/util/matcher/RegexRequestMatcher.java +++ b/web/src/main/java/org/springframework/security/web/util/matcher/RegexRequestMatcher.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2016 the original author or authors. + * Copyright 2002-2023 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -116,7 +116,7 @@ public final class RegexRequestMatcher implements RequestMatcher { @Override public boolean matches(HttpServletRequest request) { if (this.httpMethod != null && request.getMethod() != null - && this.httpMethod != HttpMethod.resolve(request.getMethod())) { + && this.httpMethod != HttpMethod.valueOf(request.getMethod())) { return false; } String url = request.getServletPath();