Fix WhitespaceAfterCheck Checkstyle check
This commit is contained in:
@@ -125,13 +125,13 @@ public class Sec2758Tests {
|
||||
|
||||
@Override
|
||||
public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException {
|
||||
if(bean instanceof Jsr250MethodSecurityMetadataSource) {
|
||||
if (bean instanceof Jsr250MethodSecurityMetadataSource) {
|
||||
((Jsr250MethodSecurityMetadataSource) bean).setDefaultRolePrefix(null);
|
||||
}
|
||||
if(bean instanceof DefaultMethodSecurityExpressionHandler) {
|
||||
if (bean instanceof DefaultMethodSecurityExpressionHandler) {
|
||||
((DefaultMethodSecurityExpressionHandler) bean).setDefaultRolePrefix(null);
|
||||
}
|
||||
if(bean instanceof DefaultWebSecurityExpressionHandler) {
|
||||
if (bean instanceof DefaultWebSecurityExpressionHandler) {
|
||||
((DefaultWebSecurityExpressionHandler) bean).setDefaultRolePrefix(null);
|
||||
}
|
||||
return bean;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2016 the original author or authors.
|
||||
* Copyright 2002-2018 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.
|
||||
@@ -45,7 +45,7 @@ public class WebSecurityConfigurerAdapterPowermockTests {
|
||||
|
||||
@After
|
||||
public void close() {
|
||||
if(context != null) {
|
||||
if (context != null) {
|
||||
context.close();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2015 the original author or authors.
|
||||
* Copyright 2002-2018 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.
|
||||
@@ -58,7 +58,7 @@ public class HttpSecurityAntMatchersTests {
|
||||
|
||||
@After
|
||||
public void cleanup() {
|
||||
if(context != null) {
|
||||
if (context != null) {
|
||||
context.close();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2015 the original author or authors.
|
||||
* Copyright 2002-2018 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.
|
||||
@@ -59,7 +59,7 @@ public class HttpSecurityLogoutTests {
|
||||
|
||||
@After
|
||||
public void cleanup() {
|
||||
if(context != null) {
|
||||
if (context != null) {
|
||||
context.close();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -193,24 +193,24 @@ public class XsdDocumentedTests {
|
||||
|
||||
List<String> lines = Files.readAllLines(Paths.get(this.referenceLocation));
|
||||
for ( String line : lines ) {
|
||||
if(line.matches("^\\[\\[.*\\]\\]$")) {
|
||||
if (line.matches("^\\[\\[.*\\]\\]$")) {
|
||||
String id = line.substring(2, line.length() - 2);
|
||||
|
||||
if(id.endsWith("-children")) {
|
||||
if (id.endsWith("-children")) {
|
||||
docAttrName = id.substring(0, id.length() - 9);
|
||||
currentDocAttrNameToElmt = docAttrNameToChildren;
|
||||
} else if(id.endsWith("-parents")) {
|
||||
} else if (id.endsWith("-parents")) {
|
||||
docAttrName = id.substring(0, id.length() - 8);
|
||||
currentDocAttrNameToElmt = docAttrNameToParents;
|
||||
} else if(docAttrName != null && !id.startsWith(docAttrName)) {
|
||||
} else if (docAttrName != null && !id.startsWith(docAttrName)) {
|
||||
currentDocAttrNameToElmt = null;
|
||||
docAttrName = null;
|
||||
}
|
||||
}
|
||||
|
||||
if(docAttrName != null && currentDocAttrNameToElmt != null) {
|
||||
if (docAttrName != null && currentDocAttrNameToElmt != null) {
|
||||
String expression = "^\\* <<(nsa-.*),.*>>$";
|
||||
if(line.matches(expression)) {
|
||||
if (line.matches(expression)) {
|
||||
String elmtId = line.replaceAll(expression, "$1");
|
||||
currentDocAttrNameToElmt
|
||||
.computeIfAbsent(docAttrName, key -> new ArrayList<>())
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2016 the original author or authors.
|
||||
* Copyright 2002-2018 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.
|
||||
@@ -37,7 +37,7 @@ public class HttpInterceptUrlTests {
|
||||
|
||||
@After
|
||||
public void close() {
|
||||
if(context != null) {
|
||||
if (context != null) {
|
||||
context.close();
|
||||
}
|
||||
}
|
||||
@@ -57,7 +57,7 @@ public class HttpInterceptUrlTests {
|
||||
}
|
||||
|
||||
private void loadConfig(String... configLocations) {
|
||||
for(int i=0; i<configLocations.length; i++) {
|
||||
for (int i=0; i<configLocations.length; i++) {
|
||||
configLocations[i] = getClass().getName().replaceAll("\\.", "/") + "-" + configLocations[i];
|
||||
}
|
||||
XmlWebApplicationContext context = new XmlWebApplicationContext();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2015 the original author or authors.
|
||||
* Copyright 2002-2018 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.
|
||||
@@ -48,7 +48,7 @@ public class CustomConfigurer extends SecurityConfigurerAdapter<DefaultSecurityF
|
||||
.antMatchers(permitAllPattern).permitAll()
|
||||
.anyRequest().authenticated();
|
||||
|
||||
if(http.getConfigurer(FormLoginConfigurer.class) == null) {
|
||||
if (http.getConfigurer(FormLoginConfigurer.class) == null) {
|
||||
// only apply if formLogin() was not invoked by the user
|
||||
http
|
||||
.formLogin()
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2015 the original author or authors.
|
||||
* Copyright 2002-2018 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.
|
||||
@@ -63,7 +63,7 @@ public class CustomHttpSecurityConfigurerTests {
|
||||
|
||||
@After
|
||||
public void cleanup() {
|
||||
if(context != null) {
|
||||
if (context != null) {
|
||||
context.close();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -183,7 +183,7 @@ public class HeaderSpecTests {
|
||||
}
|
||||
|
||||
private void expectHeaderNamesNotPresent(String... headerNames) {
|
||||
for(String headerName : headerNames) {
|
||||
for (String headerName : headerNames) {
|
||||
this.expectedHeaders.remove(headerName);
|
||||
this.headerNamesNotPresent.add(headerName);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 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.
|
||||
@@ -77,7 +77,7 @@ final class HtmlUnitWebTestClient {
|
||||
String requestBody = webRequest.getRequestBody();
|
||||
if (requestBody == null) {
|
||||
List<NameValuePair> params = webRequest.getRequestParameters();
|
||||
if(params != null && !params.isEmpty()) {
|
||||
if (params != null && !params.isEmpty()) {
|
||||
return request.body(BodyInserters.fromFormData(formData(params)));
|
||||
}
|
||||
return request;
|
||||
@@ -153,7 +153,7 @@ final class HtmlUnitWebTestClient {
|
||||
URI location = response.headers().asHttpHeaders().getLocation();
|
||||
String host = request.url().getHost();
|
||||
String scheme = request.url().getScheme();
|
||||
if(location != null) {
|
||||
if (location != null) {
|
||||
String redirectUrl = location.toASCIIString();
|
||||
if (location.getHost() == null) {
|
||||
redirectUrl = scheme+ "://" + host + location.toASCIIString();
|
||||
@@ -180,7 +180,7 @@ final class HtmlUnitWebTestClient {
|
||||
.doOnSuccess( response -> {
|
||||
response.cookies().values().forEach( cookies -> {
|
||||
cookies.forEach( cookie -> {
|
||||
if(cookie.getMaxAge().isZero()) {
|
||||
if (cookie.getMaxAge().isZero()) {
|
||||
this.cookies.remove(cookie.getName());
|
||||
} else {
|
||||
this.cookies.put(cookie.getName(), cookie);
|
||||
|
||||
Reference in New Issue
Block a user