Consistent formatting

This commit is contained in:
Juergen Hoeller
2016-03-24 19:22:49 +01:00
parent 2cdb0cf690
commit 517ebd1d3e
101 changed files with 681 additions and 509 deletions

View File

@@ -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);

View File

@@ -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);

View File

@@ -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;
}
}

View File

@@ -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, "");
}
}

View File

@@ -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();