mirror of
https://github.com/spring-projects/spring-security.git
synced 2026-02-25 14:45:14 +00:00
Fix checkstyle
Issue gh-18530
This commit is contained in:
parent
d5ba9dcada
commit
53300be8d7
@ -125,8 +125,7 @@ class AuthorizationFilterParser implements BeanDefinitionParser {
|
||||
for (Element interceptMessage : interceptMessages) {
|
||||
String accessExpression = interceptMessage.getAttribute(ATT_ACCESS);
|
||||
if (!StringUtils.hasText(accessExpression)) {
|
||||
parserContext.getReaderContext()
|
||||
.error("access attribute cannot be empty or null", interceptMessage);
|
||||
parserContext.getReaderContext().error("access attribute cannot be empty or null", interceptMessage);
|
||||
continue;
|
||||
}
|
||||
BeanDefinitionBuilder authorizationManager = BeanDefinitionBuilder
|
||||
|
||||
@ -144,8 +144,7 @@ public class FilterInvocationSecurityMetadataSourceParser implements BeanDefinit
|
||||
String access = urlElt.getAttribute(ATT_ACCESS);
|
||||
String path = urlElt.getAttribute(ATT_PATTERN);
|
||||
if (!StringUtils.hasText(access)) {
|
||||
parserContext.getReaderContext()
|
||||
.error("access attribute cannot be empty or null", urlElt);
|
||||
parserContext.getReaderContext().error("access attribute cannot be empty or null", urlElt);
|
||||
continue;
|
||||
}
|
||||
String matcherRef = urlElt.getAttribute(HttpSecurityBeanDefinitionParser.ATT_REQUEST_MATCHER_REF);
|
||||
|
||||
@ -343,8 +343,8 @@ public class InterceptUrlConfigTests {
|
||||
@Test
|
||||
public void configWhenInterceptUrlMissingAccessThenException() {
|
||||
assertThatExceptionOfType(BeanDefinitionParsingException.class)
|
||||
.isThrownBy(() -> this.spring.configLocations(this.xml("MissingAccess")).autowire())
|
||||
.withMessageContaining("access attribute cannot be empty or null");
|
||||
.isThrownBy(() -> this.spring.configLocations(this.xml("MissingAccess")).autowire())
|
||||
.withMessageContaining("access attribute cannot be empty or null");
|
||||
}
|
||||
|
||||
/**
|
||||
@ -353,8 +353,8 @@ public class InterceptUrlConfigTests {
|
||||
@Test
|
||||
public void configWhenInterceptUrlEmptyAccessThenException() {
|
||||
assertThatExceptionOfType(BeanDefinitionParsingException.class)
|
||||
.isThrownBy(() -> this.spring.configLocations(this.xml("EmptyAccess")).autowire())
|
||||
.withMessageContaining("access attribute cannot be empty or null");
|
||||
.isThrownBy(() -> this.spring.configLocations(this.xml("EmptyAccess")).autowire())
|
||||
.withMessageContaining("access attribute cannot be empty or null");
|
||||
}
|
||||
|
||||
/**
|
||||
@ -362,8 +362,7 @@ public class InterceptUrlConfigTests {
|
||||
*/
|
||||
@Test
|
||||
public void configWhenInterceptUrlValidAccessThenLoads() {
|
||||
assertThatNoException()
|
||||
.isThrownBy(() -> this.spring.configLocations(this.xml("ValidAccess")).autowire());
|
||||
assertThatNoException().isThrownBy(() -> this.spring.configLocations(this.xml("ValidAccess")).autowire());
|
||||
}
|
||||
|
||||
/**
|
||||
@ -372,8 +371,8 @@ public class InterceptUrlConfigTests {
|
||||
@Test
|
||||
public void configWhenUseAuthorizationManagerFalseAndMissingAccessThenException() {
|
||||
assertThatExceptionOfType(BeanDefinitionParsingException.class)
|
||||
.isThrownBy(() -> this.spring.configLocations(this.xml("MissingAccessLegacy")).autowire())
|
||||
.withMessageContaining("access attribute cannot be empty or null");
|
||||
.isThrownBy(() -> this.spring.configLocations(this.xml("MissingAccessLegacy")).autowire())
|
||||
.withMessageContaining("access attribute cannot be empty or null");
|
||||
}
|
||||
|
||||
/**
|
||||
@ -382,8 +381,8 @@ public class InterceptUrlConfigTests {
|
||||
@Test
|
||||
public void configWhenUseAuthorizationManagerFalseAndEmptyAccessThenException() {
|
||||
assertThatExceptionOfType(BeanDefinitionParsingException.class)
|
||||
.isThrownBy(() -> this.spring.configLocations(this.xml("EmptyAccessLegacy")).autowire())
|
||||
.withMessageContaining("access attribute cannot be empty or null");
|
||||
.isThrownBy(() -> this.spring.configLocations(this.xml("EmptyAccessLegacy")).autowire())
|
||||
.withMessageContaining("access attribute cannot be empty or null");
|
||||
}
|
||||
|
||||
private static RequestPostProcessor adminCredentials() {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user