Reformat code

This commit is contained in:
Phillip Webb 2015-09-08 14:07:06 -07:00
parent 0f6b60d8c8
commit 15686ed4fd
43 changed files with 73 additions and 74 deletions

View File

@ -94,17 +94,17 @@ public class RedisMultiMetricRepositoryTests {
@Test
public void setAndGetMultiple() {
this.repository.set("foo", Arrays.<Metric<?>> asList(new Metric<Number>(
"foo.val", 12.3), new Metric<Number>("foo.bar", 11.3)));
this.repository.set("foo", Arrays.<Metric<?>>asList(new Metric<Number>("foo.val",
12.3), new Metric<Number>("foo.bar", 11.3)));
assertEquals(2, Iterables.collection(this.repository.findAll("foo")).size());
}
@Test
public void groups() {
this.repository.set("foo", Arrays.<Metric<?>> asList(new Metric<Number>(
"foo.val", 12.3), new Metric<Number>("foo.bar", 11.3)));
this.repository.set("bar", Arrays.<Metric<?>> asList(new Metric<Number>(
"bar.val", 12.3), new Metric<Number>("bar.foo", 11.3)));
this.repository.set("foo", Arrays.<Metric<?>>asList(new Metric<Number>("foo.val",
12.3), new Metric<Number>("foo.bar", 11.3)));
this.repository.set("bar", Arrays.<Metric<?>>asList(new Metric<Number>("bar.val",
12.3), new Metric<Number>("bar.foo", 11.3)));
Collection<String> groups = Iterables.collection(this.repository.groups());
assertEquals(2, groups.size());
assertTrue("Wrong groups: " + groups, groups.contains("foo"));
@ -112,10 +112,10 @@ public class RedisMultiMetricRepositoryTests {
@Test
public void count() {
this.repository.set("foo", Arrays.<Metric<?>> asList(new Metric<Number>(
"foo.val", 12.3), new Metric<Number>("foo.bar", 11.3)));
this.repository.set("bar", Arrays.<Metric<?>> asList(new Metric<Number>(
"bar.val", 12.3), new Metric<Number>("bar.foo", 11.3)));
this.repository.set("foo", Arrays.<Metric<?>>asList(new Metric<Number>("foo.val",
12.3), new Metric<Number>("foo.bar", 11.3)));
this.repository.set("bar", Arrays.<Metric<?>>asList(new Metric<Number>("bar.val",
12.3), new Metric<Number>("bar.foo", 11.3)));
assertEquals(2, this.repository.countGroups());
}

View File

@ -36,7 +36,8 @@ import static org.junit.Assert.assertFalse;
public class DropwizardMetricWriterTests {
private final MetricRegistry registry = new MetricRegistry();
private final DropwizardMetricWriter writer = new DropwizardMetricWriter(this.registry);
private final DropwizardMetricWriter writer = new DropwizardMetricWriter(
this.registry);
@Test
public void incrementCounter() {

View File

@ -45,8 +45,7 @@ public class JacksonProperties {
/**
* Joda date time format string (yyyy-MM-dd HH:mm:ss). If not configured,
* "date-format" will be used as a fallback if it is configured with a format
* string.
* "date-format" will be used as a fallback if it is configured with a format string.
*/
private String jodaDateTimeFormat;

View File

@ -86,7 +86,8 @@ enum DatabaseDriver {
/**
* SQL Server
*/
SQLSERVER("com.microsoft.sqlserver.jdbc.SQLServerDriver", "com.microsoft.sqlserver.jdbc.SQLServerXADataSource");
SQLSERVER("com.microsoft.sqlserver.jdbc.SQLServerDriver",
"com.microsoft.sqlserver.jdbc.SQLServerXADataSource");
private final String driverClassName;

View File

@ -81,7 +81,8 @@ public class CliTester implements TestRule {
try {
this.commands.add(future.get(this.timeout, TimeUnit.MILLISECONDS));
return getOutput();
} catch (Exception ex) {
}
catch (Exception ex) {
return getOutput();
}
}

View File

@ -33,8 +33,7 @@ import org.springframework.boot.configurationprocessor.fieldvalues.javac.JavaCom
public interface FieldValuesParser {
/**
* Implementation of {@link FieldValuesParser} that always returns an empty
* result.
* Implementation of {@link FieldValuesParser} that always returns an empty result.
*/
public static final FieldValuesParser NONE = new FieldValuesParser() {

View File

@ -16,7 +16,6 @@
package org.springframework.boot.configurationsample.simple;
/**
* This has no annotation on purpose to check that no meta-data is generated.
*

View File

@ -138,8 +138,7 @@ public class PropertiesLauncherTests {
public void testCustomClassLoaderCreation() throws Exception {
System.setProperty("loader.classLoader", TestLoader.class.getName());
PropertiesLauncher launcher = new PropertiesLauncher();
ClassLoader loader = launcher
.createClassLoader(Collections.<Archive> emptyList());
ClassLoader loader = launcher.createClassLoader(Collections.<Archive>emptyList());
assertNotNull(loader);
assertEquals(TestLoader.class.getName(), loader.getClass().getName());
}