Polish
See gh-15695
This commit is contained in:
committed by
Stephane Nicoll
parent
b22561877d
commit
af3ed9ff9f
@@ -72,7 +72,7 @@ public class HttpMessageConverters implements Iterable<HttpMessageConverter<?>>
|
||||
* converters.
|
||||
* @param additionalConverters additional converters to be added. Items are added just
|
||||
* before any default converter of the same type (or at the front of the list if no
|
||||
* default converter is found) The {@link #postProcessConverters(List)} method can be
|
||||
* default converter is found). The {@link #postProcessConverters(List)} method can be
|
||||
* used for further converter manipulation.
|
||||
*/
|
||||
public HttpMessageConverters(HttpMessageConverter<?>... additionalConverters) {
|
||||
@@ -84,7 +84,7 @@ public class HttpMessageConverters implements Iterable<HttpMessageConverter<?>>
|
||||
* converters.
|
||||
* @param additionalConverters additional converters to be added. Items are added just
|
||||
* before any default converter of the same type (or at the front of the list if no
|
||||
* default converter is found) The {@link #postProcessConverters(List)} method can be
|
||||
* default converter is found). The {@link #postProcessConverters(List)} method can be
|
||||
* used for further converter manipulation.
|
||||
*/
|
||||
public HttpMessageConverters(
|
||||
@@ -97,7 +97,7 @@ public class HttpMessageConverters implements Iterable<HttpMessageConverter<?>>
|
||||
* @param addDefaultConverters if default converters should be added
|
||||
* @param converters converters to be added. Items are added just before any default
|
||||
* converter of the same type (or at the front of the list if no default converter is
|
||||
* found) The {@link #postProcessConverters(List)} method can be used for further
|
||||
* found). The {@link #postProcessConverters(List)} method can be used for further
|
||||
* converter manipulation.
|
||||
*/
|
||||
public HttpMessageConverters(boolean addDefaultConverters,
|
||||
|
||||
@@ -46,8 +46,7 @@ public class LdapAutoConfigurationTests {
|
||||
public void contextSourceWithDefaultUrl() {
|
||||
this.contextRunner.run((context) -> {
|
||||
LdapContextSource contextSource = context.getBean(LdapContextSource.class);
|
||||
String[] urls = getUrls(contextSource);
|
||||
assertThat(urls).containsExactly("ldap://localhost:389");
|
||||
assertThat(contextSource.getUrls()).containsExactly("ldap://localhost:389");
|
||||
assertThat(contextSource.isAnonymousReadOnly()).isFalse();
|
||||
});
|
||||
}
|
||||
@@ -58,8 +57,8 @@ public class LdapAutoConfigurationTests {
|
||||
.run((context) -> {
|
||||
LdapContextSource contextSource = context
|
||||
.getBean(LdapContextSource.class);
|
||||
String[] urls = getUrls(contextSource);
|
||||
assertThat(urls).containsExactly("ldap://localhost:123");
|
||||
assertThat(contextSource.getUrls())
|
||||
.containsExactly("ldap://localhost:123");
|
||||
});
|
||||
}
|
||||
|
||||
@@ -72,9 +71,8 @@ public class LdapAutoConfigurationTests {
|
||||
LdapContextSource contextSource = context
|
||||
.getBean(LdapContextSource.class);
|
||||
LdapProperties ldapProperties = context.getBean(LdapProperties.class);
|
||||
String[] urls = getUrls(contextSource);
|
||||
assertThat(urls).containsExactly("ldap://localhost:123",
|
||||
"ldap://mycompany:123");
|
||||
assertThat(contextSource.getUrls()).containsExactly(
|
||||
"ldap://localhost:123", "ldap://mycompany:123");
|
||||
assertThat(ldapProperties.getUrls()).hasSize(2);
|
||||
});
|
||||
}
|
||||
@@ -112,16 +110,12 @@ public class LdapAutoConfigurationTests {
|
||||
.run((context) -> {
|
||||
LdapContextSource contextSource = context
|
||||
.getBean(LdapContextSource.class);
|
||||
String[] urls = getUrls(contextSource);
|
||||
assertThat(urls).containsExactly("ldap://localhost:389");
|
||||
assertThat(contextSource.getUrls())
|
||||
.containsExactly("ldap://localhost:389");
|
||||
assertThat(contextSource.isAnonymousReadOnly()).isFalse();
|
||||
});
|
||||
}
|
||||
|
||||
private String[] getUrls(LdapContextSource contextSource) {
|
||||
return contextSource.getUrls();
|
||||
}
|
||||
|
||||
@Configuration
|
||||
static class PooledContextSourceConfig {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user