Merge pull request #14202 from izeye:polish-20180826

* pr/14202:
  Polish
pull/14212/head
Stephane Nicoll 6 years ago
commit f77651a795

@ -64,7 +64,7 @@ class DataSourceInitializedPublisher implements BeanPostProcessor {
throws BeansException {
if (bean instanceof LocalContainerEntityManagerFactoryBean) {
LocalContainerEntityManagerFactoryBean factory = (LocalContainerEntityManagerFactoryBean) bean;
factory.setJpaVendorAdapter(new DataSourceSchemeCreatedPublisher(factory));
factory.setJpaVendorAdapter(new DataSourceSchemaCreatedPublisher(factory));
}
return bean;
}
@ -140,13 +140,13 @@ class DataSourceInitializedPublisher implements BeanPostProcessor {
}
final class DataSourceSchemeCreatedPublisher implements JpaVendorAdapter {
final class DataSourceSchemaCreatedPublisher implements JpaVendorAdapter {
private final JpaVendorAdapter delegate;
private final LocalContainerEntityManagerFactoryBean factory;
private DataSourceSchemeCreatedPublisher(
private DataSourceSchemaCreatedPublisher(
LocalContainerEntityManagerFactoryBean factory) {
this.delegate = factory.getJpaVendorAdapter();
this.factory = factory;

@ -213,7 +213,7 @@ public class RestartClassLoaderTests {
private <T> List<T> toList(Enumeration<T> enumeration) {
return (enumeration != null) ? Collections.list(enumeration)
: Collections.<T>emptyList();
: Collections.emptyList();
}
}

@ -5645,7 +5645,7 @@ The following component creates a listener endpoint on the `someTopic` topic:
Spring for Apache Kafka provides a factory bean to create a `StreamsBuilder` object and
manage the lifecycle of its streams. Spring Boot auto-configures the required
`KafkaStreamsConfiguration` bean as long as `kafka-streams` in on the classpath and kafka
streams is enabled via the @EnableKafkaStreams` annotation.
streams is enabled via the `@EnableKafkaStreams` annotation.
Enabling Kafka Streams means that the application id and bootstrap servers must be set.
The former can be configured using `spring.kafka.streams.application-id`, defaulting to

@ -31,20 +31,12 @@ public abstract class AbstractPropertyMapperTests {
protected abstract PropertyMapper getMapper();
protected final Iterator<String> namesFromString(String name) {
return namesFromString(name, "value");
}
protected final Iterator<String> namesFromString(String name, Object value) {
return Arrays.stream(getMapper().map(name))
.map((mapping) -> mapping.getConfigurationPropertyName().toString())
.iterator();
}
protected final Iterator<String> namesFromConfiguration(String name) {
return namesFromConfiguration(name, "value");
}
protected final Iterator<String> namesFromConfiguration(String name, String value) {
return Arrays.stream(getMapper().map(ConfigurationPropertyName.of(name)))
.map(PropertyMapping::getPropertySourceName).iterator();
}

Loading…
Cancel
Save