Commit 602f733f authored by Stephane Nicoll's avatar Stephane Nicoll

Merge pull request #12205 from izeye:polish-20180224

* pr/12205:
  Polish
parents 13146788 d441a8a8
...@@ -44,7 +44,7 @@ public class EmbeddedLdapProperties { ...@@ -44,7 +44,7 @@ public class EmbeddedLdapProperties {
private Credential credential = new Credential(); private Credential credential = new Credential();
/** /**
* List of base DN. * List of base DNs.
*/ */
@Delimiter(Delimiter.NONE) @Delimiter(Delimiter.NONE)
private List<String> baseDn = new ArrayList<>(); private List<String> baseDn = new ArrayList<>();
......
...@@ -57,8 +57,7 @@ public class ServletWebServerFactoryCustomizer implements ...@@ -57,8 +57,7 @@ public class ServletWebServerFactoryCustomizer implements
.to(factory::setDisplayName); .to(factory::setDisplayName);
map.from(this.serverProperties.getServlet()::getSession).to(factory::setSession); map.from(this.serverProperties.getServlet()::getSession).to(factory::setSession);
map.from(this.serverProperties::getSsl).to(factory::setSsl); map.from(this.serverProperties::getSsl).to(factory::setSsl);
map.from(this.serverProperties::getServlet).as(ServerProperties.Servlet::getJsp) map.from(this.serverProperties.getServlet()::getJsp).to(factory::setJsp);
.to(factory::setJsp);
map.from(this.serverProperties::getCompression).to(factory::setCompression); map.from(this.serverProperties::getCompression).to(factory::setCompression);
map.from(this.serverProperties::getHttp2).to(factory::setHttp2); map.from(this.serverProperties::getHttp2).to(factory::setHttp2);
map.from(this.serverProperties::getServerHeader).to(factory::setServerHeader); map.from(this.serverProperties::getServerHeader).to(factory::setServerHeader);
......
...@@ -82,7 +82,7 @@ public class DataSourceJmxConfigurationTests { ...@@ -82,7 +82,7 @@ public class DataSourceJmxConfigurationTests {
assertThat(this.context.getBean(HikariDataSource.class).isRegisterMbeans()) assertThat(this.context.getBean(HikariDataSource.class).isRegisterMbeans())
.isTrue(); .isTrue();
// We can't rely on the number of MBeans so we're checking that the pool and pool // We can't rely on the number of MBeans so we're checking that the pool and pool
// config mBeans were registered // config MBeans were registered
assertThat(mBeanServer assertThat(mBeanServer
.queryMBeans(new ObjectName("com.zaxxer.hikari:type=*"), null).size()) .queryMBeans(new ObjectName("com.zaxxer.hikari:type=*"), null).size())
.isEqualTo(existingInstances.size() + 2); .isEqualTo(existingInstances.size() + 2);
......
...@@ -144,14 +144,14 @@ public class RestartClassLoaderTests { ...@@ -144,14 +144,14 @@ public class RestartClassLoaderTests {
public void getDeletedResource() { public void getDeletedResource() {
String name = PACKAGE_PATH + "/Sample.txt"; String name = PACKAGE_PATH + "/Sample.txt";
this.updatedFiles.addFile(name, new ClassLoaderFile(Kind.DELETED, null)); this.updatedFiles.addFile(name, new ClassLoaderFile(Kind.DELETED, null));
assertThat(this.reloadClassLoader.getResource(name)).isEqualTo(null); assertThat(this.reloadClassLoader.getResource(name)).isNull();
} }
@Test @Test
public void getDeletedResourceAsStream() { public void getDeletedResourceAsStream() {
String name = PACKAGE_PATH + "/Sample.txt"; String name = PACKAGE_PATH + "/Sample.txt";
this.updatedFiles.addFile(name, new ClassLoaderFile(Kind.DELETED, null)); this.updatedFiles.addFile(name, new ClassLoaderFile(Kind.DELETED, null));
assertThat(this.reloadClassLoader.getResourceAsStream(name)).isEqualTo(null); assertThat(this.reloadClassLoader.getResourceAsStream(name)).isNull();
} }
@Test @Test
......
...@@ -370,7 +370,7 @@ content into your application. Rather, pick only the properties that you need. ...@@ -370,7 +370,7 @@ content into your application. Rather, pick only the properties that you need.
spring.ldap.username= # Login username of the server. spring.ldap.username= # Login username of the server.
# EMBEDDED LDAP ({sc-spring-boot-autoconfigure}/ldap/embedded/EmbeddedLdapProperties.{sc-ext}[EmbeddedLdapProperties]) # EMBEDDED LDAP ({sc-spring-boot-autoconfigure}/ldap/embedded/EmbeddedLdapProperties.{sc-ext}[EmbeddedLdapProperties])
spring.ldap.embedded.base-dn= # List of base DN. spring.ldap.embedded.base-dn= # List of base DNs.
spring.ldap.embedded.credential.username= # Embedded LDAP username. spring.ldap.embedded.credential.username= # Embedded LDAP username.
spring.ldap.embedded.credential.password= # Embedded LDAP password. spring.ldap.embedded.credential.password= # Embedded LDAP password.
spring.ldap.embedded.ldif=classpath:schema.ldif # Schema (LDIF) script resource reference. spring.ldap.embedded.ldif=classpath:schema.ldif # Schema (LDIF) script resource reference.
......
...@@ -4466,7 +4466,7 @@ In yaml files, you can use the yaml list notation: ...@@ -4466,7 +4466,7 @@ In yaml files, you can use the yaml list notation:
- dc=pivotal,dc=io - dc=pivotal,dc=io
---- ----
in properties files, you must include the index as part of the property name: In properties files, you must include the index as part of the property name:
[source,properties,indent=0] [source,properties,indent=0]
---- ----
......
...@@ -65,7 +65,7 @@ public class Deprecation implements Serializable { ...@@ -65,7 +65,7 @@ public class Deprecation implements Serializable {
* A single-line, single-sentence reason why the related property is deprecated, if * A single-line, single-sentence reason why the related property is deprecated, if
* any. * any.
* @return the short deprecation reason * @return the short deprecation reason
* @see #getShortReason() * @see #getReason()
*/ */
public String getShortReason() { public String getShortReason() {
return this.shortReason; return this.shortReason;
......
...@@ -121,7 +121,7 @@ public class JsonReaderTests extends AbstractConfigurationMetadataTests { ...@@ -121,7 +121,7 @@ public class JsonReaderTests extends AbstractConfigurationMetadataTests {
assertThat(valueHint.getDescription()).isEqualTo("One."); assertThat(valueHint.getDescription()).isEqualTo("One.");
ValueHint valueHint2 = hint.getValueHints().get(1); ValueHint valueHint2 = hint.getValueHints().get(1);
assertThat(valueHint2.getValue()).isEqualTo("two"); assertThat(valueHint2.getValue()).isEqualTo("two");
assertThat(valueHint2.getDescription()).isEqualTo(null); assertThat(valueHint2.getDescription()).isNull();
assertThat(hint.getValueProviders()).hasSize(2); assertThat(hint.getValueProviders()).hasSize(2);
ValueProvider valueProvider = hint.getValueProviders().get(0); ValueProvider valueProvider = hint.getValueProviders().get(0);
...@@ -175,7 +175,7 @@ public class JsonReaderTests extends AbstractConfigurationMetadataTests { ...@@ -175,7 +175,7 @@ public class JsonReaderTests extends AbstractConfigurationMetadataTests {
assertProperty(item3, "spring.server.name", "spring.server.name", String.class, assertProperty(item3, "spring.server.name", "spring.server.name", String.class,
null); null);
assertThat(item3.isDeprecated()).isFalse(); assertThat(item3.isDeprecated()).isFalse();
assertThat(item3.getDeprecation()).isEqualTo(null); assertThat(item3.getDeprecation()).isNull();
ConfigurationMetadataItem item4 = items.get(3); ConfigurationMetadataItem item4 = items.get(3);
assertProperty(item4, "spring.server-name", "spring.server-name", String.class, assertProperty(item4, "spring.server-name", "spring.server-name", String.class,
......
...@@ -67,7 +67,7 @@ public class SentenceExtractorTests { ...@@ -67,7 +67,7 @@ public class SentenceExtractorTests {
@Test @Test
public void extractFirstSentenceNull() { public void extractFirstSentenceNull() {
assertThat(this.extractor.getFirstSentence(null)).isEqualTo(null); assertThat(this.extractor.getFirstSentence(null)).isNull();
} }
} }
...@@ -209,7 +209,7 @@ public class RepackagerTests { ...@@ -209,7 +209,7 @@ public class RepackagerTests {
repackager.repackage(file, NO_LIBRARIES); repackager.repackage(file, NO_LIBRARIES);
Manifest actualManifest = getManifest(file); Manifest actualManifest = getManifest(file);
assertThat(actualManifest.getMainAttributes().getValue("Main-Class")) assertThat(actualManifest.getMainAttributes().getValue("Main-Class"))
.isEqualTo(null); .isNull();
assertThat(hasLauncherClasses(file)).isFalse(); assertThat(hasLauncherClasses(file)).isFalse();
} }
......
...@@ -143,7 +143,7 @@ public class PropertyMapperTests { ...@@ -143,7 +143,7 @@ public class PropertyMapperTests {
} }
@Test @Test
public void whenInstanceOfToWhenValueIsTargetTypeShouldMatch() { public void whenInstanceOfWhenValueIsTargetTypeShouldMatch() {
Long result = this.map.from(() -> 123L).whenInstanceOf(Long.class) Long result = this.map.from(() -> 123L).whenInstanceOf(Long.class)
.toInstance((value) -> value + 1); .toInstance((value) -> value + 1);
assertThat(result).isEqualTo(124L); assertThat(result).isEqualTo(124L);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment