Consistent formatting
This commit is contained in:
@@ -224,7 +224,7 @@ public class ResourceHttpRequestHandler extends WebContentGenerator
|
||||
if (this.contentNegotiationManager == null) {
|
||||
this.contentNegotiationManager = initContentNegotiationManager();
|
||||
}
|
||||
if( this.resourceHttpMessageConverter == null) {
|
||||
if ( this.resourceHttpMessageConverter == null) {
|
||||
this.resourceHttpMessageConverter = new ResourceHttpMessageConverter();
|
||||
}
|
||||
}
|
||||
@@ -486,7 +486,7 @@ public class ResourceHttpRequestHandler extends WebContentGenerator
|
||||
ServletWebRequest webRequest = new ServletWebRequest(request);
|
||||
try {
|
||||
List<MediaType> mediaTypes = getContentNegotiationManager().resolveMediaTypes(webRequest);
|
||||
if(!mediaTypes.isEmpty()) {
|
||||
if (!mediaTypes.isEmpty()) {
|
||||
mediaType = mediaTypes.get(0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -218,7 +218,7 @@ public class ResourceUrlProvider implements ApplicationListener<ContextRefreshed
|
||||
if (!matchingPatterns.isEmpty()) {
|
||||
Comparator<String> patternComparator = getPathMatcher().getPatternComparator(lookupPath);
|
||||
Collections.sort(matchingPatterns, patternComparator);
|
||||
for(String pattern : matchingPatterns) {
|
||||
for (String pattern : matchingPatterns) {
|
||||
String pathWithinMapping = getPathMatcher().extractPathWithinPattern(pattern, lookupPath);
|
||||
String pathMapping = lookupPath.substring(0, lookupPath.indexOf(pathWithinMapping));
|
||||
if (logger.isTraceEnabled()) {
|
||||
|
||||
@@ -123,9 +123,9 @@ public class VersionResourceResolver extends AbstractResourceResolver {
|
||||
List<String> patternsList = Arrays.asList(pathPatterns);
|
||||
List<String> prefixedPatterns = new ArrayList<String>(pathPatterns.length);
|
||||
String versionPrefix = "/" + version;
|
||||
for(String pattern : patternsList) {
|
||||
for (String pattern : patternsList) {
|
||||
prefixedPatterns.add(pattern);
|
||||
if(!pattern.startsWith(versionPrefix) && !patternsList.contains(versionPrefix + pattern)) {
|
||||
if (!pattern.startsWith(versionPrefix) && !patternsList.contains(versionPrefix + pattern)) {
|
||||
prefixedPatterns.add(versionPrefix + pattern);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -176,7 +176,8 @@ public class AnnotationDrivenBeanDefinitionParserTests {
|
||||
List<HttpMessageConverter<?>> converters = (List<HttpMessageConverter<?>>) value;
|
||||
if (hasDefaultRegistrations) {
|
||||
assertTrue("Default and custom converter expected", converters.size() > 2);
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
assertTrue("Only custom converters expected", converters.size() == 2);
|
||||
}
|
||||
assertTrue(converters.get(0) instanceof StringHttpMessageConverter);
|
||||
|
||||
@@ -181,7 +181,7 @@ public class FlashMapManagerTests {
|
||||
@Test
|
||||
public void retrieveAndUpdateRemoveExpired() throws InterruptedException {
|
||||
List<FlashMap> flashMaps = new ArrayList<FlashMap>();
|
||||
for (int i=0; i < 5; i++) {
|
||||
for (int i = 0; i < 5; i++) {
|
||||
FlashMap expiredFlashMap = new FlashMap();
|
||||
expiredFlashMap.startExpirationPeriod(-1);
|
||||
flashMaps.add(expiredFlashMap);
|
||||
|
||||
@@ -465,7 +465,8 @@ public class OptionTagTests extends AbstractHtmlElementTagTests {
|
||||
tag.setValue("foo");
|
||||
tag.doStartTag();
|
||||
fail("Must throw an IllegalStateException when not nested within a <select/> tag.");
|
||||
} catch (IllegalStateException ex) {
|
||||
}
|
||||
catch (IllegalStateException ex) {
|
||||
// expected
|
||||
}
|
||||
}
|
||||
@@ -542,7 +543,8 @@ public class OptionTagTests extends AbstractHtmlElementTagTests {
|
||||
public String toId() {
|
||||
if (this.variant != null) {
|
||||
return this.rules + "-" + this.variant;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
return rules;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -100,7 +100,8 @@ public class PasswordInputTagTests extends InputTagTests {
|
||||
protected void assertValueAttribute(String output, String expectedValue) {
|
||||
if (this.getPasswordTag().isShowPassword()) {
|
||||
super.assertValueAttribute(output, expectedValue);
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
super.assertValueAttribute(output, "");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -147,11 +147,11 @@ public class ScriptTemplateViewTests {
|
||||
this.view.setApplicationContext(this.wac);
|
||||
ExecutorService executor = Executors.newFixedThreadPool(4);
|
||||
List<Future<Boolean>> results = new ArrayList<>();
|
||||
for(int i = 0; i < iterations; i++) {
|
||||
for (int i = 0; i < iterations; i++) {
|
||||
results.add(executor.submit(() -> view.getEngine() != null));
|
||||
}
|
||||
assertEquals(iterations, results.size());
|
||||
for(int i = 0; i < iterations; i++) {
|
||||
for (int i = 0; i < iterations; i++) {
|
||||
assertTrue(results.get(i).get());
|
||||
}
|
||||
executor.shutdown();
|
||||
|
||||
Reference in New Issue
Block a user