Skip to content

Commit 8c57212

Browse files
Polish javadoc
Signed-off-by: Tran Ngoc Nhan <[email protected]>
1 parent 0e70482 commit 8c57212

File tree

2 files changed

+11
-9
lines changed

2 files changed

+11
-9
lines changed

web/src/main/java/org/springframework/security/web/servlet/util/matcher/PathPatternRequestMatcher.java

+4-2
Original file line numberDiff line numberDiff line change
@@ -172,15 +172,17 @@ public String toString() {
172172
*
173173
* <p>
174174
* If you have many paths that have a common path prefix, you can use
175-
* {@link #basePath} to reduce repetition like so: <code>
175+
* {@link #basePath} to reduce repetition like so:
176+
*
177+
* <pre>
176178
* PathPatternRequestMatcher.Builder mvc = withDefaults().basePath("/mvc");
177179
* http
178180
* .authorizeHttpRequests((authorize) -> authorize
179181
* .requestMatchers(mvc.matcher("/user/**")).hasAuthority("user")
180182
* .requestMatchers(mvc.matcher("/admin/**")).hasAuthority("admin")
181183
* )
182184
* ...
183-
* </code>
185+
* </pre>
184186
*/
185187
public static final class Builder {
186188

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

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2019 the original author or authors.
2+
* Copyright 2002-2025 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.
@@ -38,7 +38,7 @@ public interface RequestMatcher {
3838
boolean matches(HttpServletRequest request);
3939

4040
/**
41-
* Returns a MatchResult for this RequestMatcher The default implementation returns
41+
* Returns a MatchResult for this RequestMatcher. The default implementation returns
4242
* {@link Collections#emptyMap()} when {@link MatchResult#getVariables()} is invoked.
4343
* @return the MatchResult from comparing this RequestMatcher against the
4444
* HttpServletRequest
@@ -50,7 +50,7 @@ default MatchResult matcher(HttpServletRequest request) {
5050
}
5151

5252
/**
53-
* The result of matching against an HttpServletRequest Contains the status, true or
53+
* The result of matching against an HttpServletRequest contains the status, true or
5454
* false, of the match and if present, any variables extracted from the match
5555
*
5656
* @since 5.2
@@ -86,7 +86,7 @@ public Map<String, String> getVariables() {
8686

8787
/**
8888
* Creates an instance of {@link MatchResult} that is a match with no variables
89-
* @return
89+
* @return {@link MatchResult} that is a match with no variables
9090
*/
9191
public static MatchResult match() {
9292
return new MatchResult(true, Collections.emptyMap());
@@ -95,16 +95,16 @@ public static MatchResult match() {
9595
/**
9696
* Creates an instance of {@link MatchResult} that is a match with the specified
9797
* variables
98-
* @param variables
99-
* @return
98+
* @param variables the specified variables
99+
* @return {@link MatchResult} that is a match with the specified variables
100100
*/
101101
public static MatchResult match(Map<String, String> variables) {
102102
return new MatchResult(true, variables);
103103
}
104104

105105
/**
106106
* Creates an instance of {@link MatchResult} that is not a match.
107-
* @return
107+
* @return {@link MatchResult} that is not a match
108108
*/
109109
public static MatchResult notMatch() {
110110
return new MatchResult(false, Collections.emptyMap());

0 commit comments

Comments
 (0)