Skip to content

Commit

Permalink
Merge branch '6.0.x'
Browse files Browse the repository at this point in the history
  • Loading branch information
marcusdacoregio committed Dec 5, 2022
2 parents 0fdcde2 + f1698ec commit 03438ff
Showing 1 changed file with 14 additions and 38 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -202,22 +202,24 @@ private StandardInterceptUrlRegistry(ApplicationContext context) {
setApplicationContext(context);
}

/**
* @deprecated use {@link #requestMatchers(HttpMethod, String...)} instead
*/
@Override
@Deprecated
public MvcMatchersAuthorizedUrl mvcMatchers(HttpMethod method, String... mvcPatterns) {
return new MvcMatchersAuthorizedUrl(createMvcMatchers(method, mvcPatterns));
public AuthorizedUrl requestMatchers(String... patterns) {
return super.requestMatchers(patterns);
}

@Override
public AuthorizedUrl requestMatchers(HttpMethod method, String... patterns) {
return super.requestMatchers(method, patterns);
}

/**
* @deprecated use {@link #requestMatchers(String...)} instead
*/
@Override
@Deprecated
public MvcMatchersAuthorizedUrl mvcMatchers(String... patterns) {
return mvcMatchers(null, patterns);
public AuthorizedUrl requestMatchers(HttpMethod method) {
return super.requestMatchers(method);
}

@Override
public AuthorizedUrl requestMatchers(RequestMatcher... requestMatchers) {
return super.requestMatchers(requestMatchers);
}

@Override
Expand All @@ -242,32 +244,6 @@ public H and() {

}

/**
* An {@link AuthorizedUrl} that allows optionally configuring the
* {@link MvcRequestMatcher#setMethod(HttpMethod)}
*
* @author Rob Winch
*/
public final class MvcMatchersAuthorizedUrl extends AuthorizedUrl {

/**
* Creates a new instance
* @param requestMatchers the {@link RequestMatcher} instances to map
*/
private MvcMatchersAuthorizedUrl(List<MvcRequestMatcher> requestMatchers) {
super(requestMatchers);
}

@SuppressWarnings("unchecked")
public AuthorizedUrl servletPath(String servletPath) {
for (MvcRequestMatcher matcher : (List<MvcRequestMatcher>) getMatchers()) {
matcher.setServletPath(servletPath);
}
return this;
}

}

/**
* Maps the specified {@link RequestMatcher} instances to {@link ConfigAttribute}
* instances.
Expand Down

0 comments on commit 03438ff

Please sign in to comment.