Replace explicit generics with diamond operator
Where possible, explicit generic declarations to use the Java 8 diamond operator. See gh-9781
This commit is contained in:
committed by
Phillip Webb
parent
eb35fc9fa6
commit
04fdec6f8b
@@ -46,7 +46,7 @@ class BootArchiveSupport {
|
||||
private static final Set<String> DEFAULT_LAUNCHER_CLASSES;
|
||||
|
||||
static {
|
||||
Set<String> defaultLauncherClasses = new HashSet<String>();
|
||||
Set<String> defaultLauncherClasses = new HashSet<>();
|
||||
defaultLauncherClasses.add("org.springframework.boot.loader.JarLauncher");
|
||||
defaultLauncherClasses.add("org.springframework.boot.loader.PropertiesLauncher");
|
||||
defaultLauncherClasses.add("org.springframework.boot.loader.WarLauncher");
|
||||
@@ -121,7 +121,7 @@ class BootArchiveSupport {
|
||||
}
|
||||
|
||||
private void configureExclusions() {
|
||||
Set<String> excludes = new HashSet<String>();
|
||||
Set<String> excludes = new HashSet<>();
|
||||
if (this.excludeDevtools) {
|
||||
excludes.add("**/spring-boot-devtools-*.jar");
|
||||
}
|
||||
|
||||
@@ -132,7 +132,7 @@ class BootZipCopyAction implements CopyAction {
|
||||
private Spec<FileTreeElement> writeLoaderClasses(ZipArchiveOutputStream out) {
|
||||
try (ZipInputStream in = new ZipInputStream(getClass()
|
||||
.getResourceAsStream("/META-INF/loader/spring-boot-loader.jar"))) {
|
||||
Set<String> entries = new HashSet<String>();
|
||||
Set<String> entries = new HashSet<>();
|
||||
java.util.zip.ZipEntry entry;
|
||||
while ((entry = in.getNextEntry()) != null) {
|
||||
if (entry.isDirectory() && !entry.getName().startsWith("META-INF/")) {
|
||||
|
||||
@@ -34,7 +34,7 @@ public class LaunchScriptConfiguration implements Serializable {
|
||||
|
||||
private boolean included = false;
|
||||
|
||||
private final Map<String, String> properties = new HashMap<String, String>();
|
||||
private final Map<String, String> properties = new HashMap<>();
|
||||
|
||||
private File script;
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ class PomCondition extends Condition<File> {
|
||||
private Set<String> notExpectedContents;
|
||||
|
||||
PomCondition() {
|
||||
this(new HashSet<String>(), new HashSet<String>());
|
||||
this(new HashSet<>(), new HashSet<>());
|
||||
}
|
||||
|
||||
private PomCondition(Set<String> expectedContents, Set<String> notExpectedContents) {
|
||||
|
||||
@@ -160,7 +160,7 @@ public class GradleBuild implements TestRule {
|
||||
if (this.gradleVersion != null) {
|
||||
gradleRunner.withGradleVersion(this.gradleVersion);
|
||||
}
|
||||
List<String> allArguments = new ArrayList<String>();
|
||||
List<String> allArguments = new ArrayList<>();
|
||||
allArguments.add("-PpluginClasspath=" + pluginClasspath());
|
||||
allArguments.add("-PbootVersion=" + getBootVersion());
|
||||
allArguments.add("--stacktrace");
|
||||
|
||||
Reference in New Issue
Block a user