Browse Source

Use interfaces for collection declarations

Closes gh-11839
pull/11845/head
dreis2211 8 years ago committed by Phillip Webb
parent
commit
e7248ff273
  1. 2
      spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/info/Info.java
  2. 2
      spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/DefaultCommandFactory.java
  3. 2
      spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/init/ServiceCapabilitiesReportGenerator.java
  4. 2
      spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/options/OptionHandler.java
  5. 2
      spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/AstUtils.java
  6. 2
      spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/GroovyCompiler.java
  7. 2
      spring-boot-project/spring-boot/src/main/java/org/springframework/boot/builder/SpringApplicationBuilder.java

2
spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/info/Info.java

@ -40,7 +40,7 @@ public final class Info { @@ -40,7 +40,7 @@ public final class Info {
private final Map<String, Object> details;
private Info(Builder builder) {
LinkedHashMap<String, Object> content = new LinkedHashMap<>();
Map<String, Object> content = new LinkedHashMap<>();
content.putAll(builder.content);
this.details = Collections.unmodifiableMap(content);
}

2
spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/DefaultCommandFactory.java

@ -42,7 +42,7 @@ public class DefaultCommandFactory implements CommandFactory { @@ -42,7 +42,7 @@ public class DefaultCommandFactory implements CommandFactory {
private static final List<Command> DEFAULT_COMMANDS;
static {
ArrayList<Command> defaultCommands = new ArrayList<>();
List<Command> defaultCommands = new ArrayList<>();
defaultCommands.add(new VersionCommand());
defaultCommands.add(new RunCommand());
defaultCommands.add(new GrabCommand());

2
spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/init/ServiceCapabilitiesReportGenerator.java

@ -93,7 +93,7 @@ class ServiceCapabilitiesReportGenerator { @@ -93,7 +93,7 @@ class ServiceCapabilitiesReportGenerator {
}
private List<Dependency> getSortedDependencies(InitializrServiceMetadata metadata) {
ArrayList<Dependency> dependencies = new ArrayList<>(metadata.getDependencies());
List<Dependency> dependencies = new ArrayList<>(metadata.getDependencies());
dependencies.sort(Comparator.comparing(Dependency::getId));
return dependencies;
}

2
spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/options/OptionHandler.java

@ -150,7 +150,7 @@ public class OptionHandler { @@ -150,7 +150,7 @@ public class OptionHandler {
private static class OptionHelpAdapter implements OptionHelp {
private final LinkedHashSet<String> options;
private final Set<String> options;
private final String description;

2
spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/AstUtils.java

@ -167,7 +167,7 @@ public abstract class AstUtils { @@ -167,7 +167,7 @@ public abstract class AstUtils {
private static List<ExpressionStatement> getExpressionStatements(
BlockStatement block) {
ArrayList<ExpressionStatement> statements = new ArrayList<>();
List<ExpressionStatement> statements = new ArrayList<>();
for (Statement statement : block.getStatements()) {
if (statement instanceof ExpressionStatement) {
statements.add((ExpressionStatement) statement);

2
spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/GroovyCompiler.java

@ -257,7 +257,7 @@ public class GroovyCompiler { @@ -257,7 +257,7 @@ public class GroovyCompiler {
});
}
private int getIndexOfASTTransformationVisitor(LinkedList<?> conversionOperations) {
private int getIndexOfASTTransformationVisitor(List<?> conversionOperations) {
for (int index = 0; index < conversionOperations.size(); index++) {
if (conversionOperations.get(index).getClass().getName()
.startsWith(ASTTransformationVisitor.class.getName())) {

2
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/builder/SpringApplicationBuilder.java

@ -424,7 +424,7 @@ public class SpringApplicationBuilder { @@ -424,7 +424,7 @@ public class SpringApplicationBuilder {
}
private Map<String, Object> getMapFromProperties(Properties properties) {
HashMap<String, Object> map = new HashMap<>();
Map<String, Object> map = new HashMap<>();
for (Object key : Collections.list(properties.propertyNames())) {
map.put((String) key, properties.get(key));
}

Loading…
Cancel
Save