Commit 64c32461 authored by Raja Kolli's avatar Raja Kolli Committed by Stephane Nicoll

Polish

See gh-11783
parent fe7d7e2f
...@@ -62,7 +62,7 @@ public class DataLdapTestIntegrationTests { ...@@ -62,7 +62,7 @@ public class DataLdapTestIntegrationTests {
public void testRepository() { public void testRepository() {
LdapQuery ldapQuery = LdapQueryBuilder.query().where("cn").is("Bob Smith"); LdapQuery ldapQuery = LdapQueryBuilder.query().where("cn").is("Bob Smith");
Optional<ExampleEntry> entry = this.exampleRepository.findOne(ldapQuery); Optional<ExampleEntry> entry = this.exampleRepository.findOne(ldapQuery);
assertThat(entry.isPresent()); assertThat(entry.isPresent()).isTrue();
assertThat(entry.get().getDn()).isEqualTo(LdapUtils assertThat(entry.get().getDn()).isEqualTo(LdapUtils
.newLdapName("cn=Bob Smith,ou=company1,c=Sweden,dc=spring,dc=org")); .newLdapName("cn=Bob Smith,ou=company1,c=Sweden,dc=spring,dc=org"));
assertThat(this.ldapTemplate.findOne(ldapQuery, ExampleEntry.class).getDn()) assertThat(this.ldapTemplate.findOne(ldapQuery, ExampleEntry.class).getDn())
......
...@@ -79,21 +79,18 @@ class StaticResourceJars { ...@@ -79,21 +79,18 @@ class StaticResourceJars {
} }
private void addUrlFile(List<URL> urls, URL url, File file) { private void addUrlFile(List<URL> urls, URL url, File file) {
if (file.isDirectory() && new File(file, "META-INF/resources").isDirectory()) { if ((file.isDirectory() && new File(file, "META-INF/resources").isDirectory())
urls.add(url); || isResourcesJar(file)) {
}
else if (isResourcesJar(file)) {
urls.add(url); urls.add(url);
} }
} }
private void addUrlConnection(List<URL> urls, URL url, URLConnection connection) { private void addUrlConnection(List<URL> urls, URL url, URLConnection connection) {
if (connection instanceof JarURLConnection) { if (connection instanceof JarURLConnection
if (isResourcesJar((JarURLConnection) connection)) { && isResourcesJar((JarURLConnection) connection)) {
urls.add(url); urls.add(url);
} }
} }
}
private boolean isResourcesJar(JarURLConnection connection) { private boolean isResourcesJar(JarURLConnection connection) {
try { try {
......
...@@ -113,8 +113,8 @@ public class InvalidConfigurationPropertyValueFailureAnalyzerTests { ...@@ -113,8 +113,8 @@ public class InvalidConfigurationPropertyValueFailureAnalyzerTests {
FailureAnalysis analysis) { FailureAnalysis analysis) {
assertThat(analysis.getDescription()).contains("test.property") assertThat(analysis.getDescription()).contains("test.property")
.contains("invalid").contains("TestOrigin test.property"); .contains("invalid").contains("TestOrigin test.property");
assertThat(analysis.getAction() assertThat(analysis.getAction())
.contains("Review the value of the property with the provided reason.")); .contains("Review the value of the property with the provided reason.");
assertThat(analysis.getCause()).isSameAs(failure); assertThat(analysis.getCause()).isSameAs(failure);
} }
......
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