= cold cleanup

* using lambda if possible (we are already building in Java8)
  * using diamond when new generic instance
  * remove used improt
This commit is contained in:
zavakid
2020-09-17 10:48:15 +08:00
parent df60eda679
commit e7658879bc
133 changed files with 990 additions and 1558 deletions

View File

@@ -23,14 +23,7 @@ public class PropertyPlaceholderConfigurer extends org.springframework.beans.fac
private static final String PLACEHOLDER_PREFIX = "${";
private static final String PLACEHOLDER_SUFFIX = "}";
public static ThreadLocal<Properties> propertiesLocal = new ThreadLocal<Properties>() {
@Override
protected Properties initialValue() {
return new Properties();
}
};
public static ThreadLocal<Properties> propertiesLocal = ThreadLocal.withInitial(Properties::new);
private ResourceLoader loader;
private String[] locationNames;
@@ -57,7 +50,7 @@ public class PropertyPlaceholderConfigurer extends org.springframework.beans.fac
}
if (locationNames != null) {
List<Resource> resources = new ArrayList<Resource>(locationNames.length);
List<Resource> resources = new ArrayList<>(locationNames.length);
for (String location : locationNames) {
location = trimToNull(location);