Formatting

pull/8206/head
Andy Wilkinson 8 years ago
parent c0c575c94a
commit f34d309548

@ -60,8 +60,7 @@ public class SpringApplicationAdminJmxAutoConfiguration {
private final Environment environment;
public SpringApplicationAdminJmxAutoConfiguration(
ObjectProvider<MBeanExporter> mbeanExporter,
Environment environment) {
ObjectProvider<MBeanExporter> mbeanExporter, Environment environment) {
this.mbeanExporter = mbeanExporter.getIfAvailable();
this.environment = environment;
}

@ -60,8 +60,9 @@ public class CouchbaseCacheConfiguration {
public CouchbaseCacheManager cacheManager() {
List<String> cacheNames = this.cacheProperties.getCacheNames();
CouchbaseCacheManager cacheManager = new CouchbaseCacheManager(
CacheBuilder.newInstance(this.bucket).withExpiration(
this.cacheProperties.getCouchbase().getExpirationSeconds()),
CacheBuilder.newInstance(this.bucket)
.withExpiration(this.cacheProperties.getCouchbase()
.getExpirationSeconds()),
cacheNames.toArray(new String[cacheNames.size()]));
return this.customizers.customize(cacheManager);
}

@ -71,8 +71,8 @@ public class DataSourceAutoConfiguration {
@Bean
@ConditionalOnMissingBean
public DataSourceInitializer dataSourceInitializer(
DataSourceProperties properties, ApplicationContext applicationContext) {
public DataSourceInitializer dataSourceInitializer(DataSourceProperties properties,
ApplicationContext applicationContext) {
return new DataSourceInitializer(properties, applicationContext);
}

@ -60,7 +60,8 @@ class DataSourceInitializer implements ApplicationListener<DataSourceInitialized
private boolean initialized = false;
DataSourceInitializer(DataSourceProperties properties, ApplicationContext applicationContext) {
DataSourceInitializer(DataSourceProperties properties,
ApplicationContext applicationContext) {
this.properties = properties;
this.applicationContext = applicationContext;
}

@ -107,7 +107,6 @@ public class AopAutoConfigurationTests {
this.context = ctx;
}
@EnableAspectJAutoProxy(proxyTargetClass = true)
@Configuration
@Import(TestConfiguration.class)

@ -66,8 +66,9 @@ public class CassandraAutoConfigurationTests {
public void createCustomizeCluster() {
load(MockCustomizerConfig.class);
assertThat(this.context.getBeanNamesForType(Cluster.class).length).isEqualTo(1);
assertThat(this.context.getBeanNamesForType(ClusterBuilderCustomizer.class).length)
.isEqualTo(1);
assertThat(
this.context.getBeanNamesForType(ClusterBuilderCustomizer.class).length)
.isEqualTo(1);
}
@Test

@ -184,24 +184,24 @@ public class JpaPropertiesTests {
@Test
public void determineDatabaseWithKnownUrl() {
JpaProperties properties = load(HibernateVersion.V5);
Database database = properties.determineDatabase(
mockDataSource("jdbc:h2:mem:testdb"));
Database database = properties
.determineDatabase(mockDataSource("jdbc:h2:mem:testdb"));
assertThat(database).isEqualTo(Database.H2);
}
@Test
public void determineDatabaseWithKnownUrlAndUserConfig() {
JpaProperties properties = load(HibernateVersion.V5, "spring.jpa.database=mysql");
Database database = properties.determineDatabase(
mockDataSource("jdbc:h2:mem:testdb"));
Database database = properties
.determineDatabase(mockDataSource("jdbc:h2:mem:testdb"));
assertThat(database).isEqualTo(Database.MYSQL);
}
@Test
public void determineDatabaseWithUnknownUrl() {
JpaProperties properties = load(HibernateVersion.V5);
Database database = properties.determineDatabase(
mockDataSource("jdbc:unknown://localhost"));
Database database = properties
.determineDatabase(mockDataSource("jdbc:unknown://localhost"));
assertThat(database).isEqualTo(Database.DEFAULT);
}
@ -222,7 +222,7 @@ public class JpaPropertiesTests {
given(ds.getConnection()).willReturn(connection);
}
catch (SQLException e) {
//Do nothing
// Do nothing
}
return ds;
}

@ -39,8 +39,8 @@ public class SampleController {
@GetMapping("/")
@ResponseBody
public Map<String, String> hello() {
return Collections.singletonMap("message", "Hello " +
this.helloWorldProperties.getName());
return Collections.singletonMap("message",
"Hello " + this.helloWorldProperties.getName());
}
protected static class Message {

@ -163,10 +163,10 @@ public abstract class SpringBootServletInitializer implements WebApplicationInit
}
/**
* Configure the application. Normally all you would need to do is to add sources (e.g.
* config classes) because other settings have sensible defaults. You might choose
* (for instance) to add default command line arguments, or set an active Spring
* profile.
* Configure the application. Normally all you would need to do is to add sources
* (e.g. config classes) because other settings have sensible defaults. You might
* choose (for instance) to add default command line arguments, or set an active
* Spring profile.
* @param builder a builder for the application context
* @return the application builder
* @see SpringApplicationBuilder

@ -144,8 +144,8 @@ public class SpringProfileDocumentMatcher implements DocumentMatcher {
}
/**
* {@link ProfilesMatcher} that matches when a value in {@code spring.profiles} is also
* in {@code spring.profiles.active}.
* {@link ProfilesMatcher} that matches when a value in {@code spring.profiles} is
* also in {@code spring.profiles.active}.
*/
private static class ActiveProfilesMatcher extends ProfilesMatcher {

Loading…
Cancel
Save