Skip to content

Commit 9d89da7

Browse files
Eric Dallo and Gabriel Lima Gomesericdallo
authored andcommitted
Add Java7 support
1 parent 40e9727 commit 9d89da7

File tree

2 files changed

+6
-11
lines changed

2 files changed

+6
-11
lines changed

.travis.yml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1 @@
1-
language: java
2-
sudo: false
3-
addons:
4-
apt:
5-
packages:
6-
- oracle-java8-installer
1+
language: java

src/main/java/com/spring/loader/S3PropertyPlaceholderConfigurer.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package com.spring.loader;
22

33
import static java.util.Arrays.asList;
4-
import static java.util.stream.Collectors.toList;
54

65
import java.util.ArrayList;
76
import java.util.List;
@@ -42,11 +41,12 @@ public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory)
4241
int total = conventionalResources.size() + s3Locations.size();
4342

4443
if (total > 0) {
45-
List<Resource> allResources = s3Locations.stream()
46-
.map(resourceLoader::getResource)
47-
.collect(toList());
44+
List<Resource> allResources = new ArrayList<>();
45+
for (String location : s3Locations) {
46+
allResources.add(resourceLoader.getResource(location));
47+
}
4848

49-
conventionalResources.forEach(allResources::add);
49+
allResources.addAll(conventionalResources);
5050

5151
super.setLocations(allResources.toArray(new Resource[allResources.size()]));
5252
}

0 commit comments

Comments
 (0)