From 051ebf3fac80d29b0f297a308c5ef540a8237e64 Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Tue, 22 Sep 2015 13:30:07 +0100 Subject: [PATCH] Polishing: fix a number of compiler warnings reported by Eclipse --- .../configurationprocessor/metadata/ConfigurationMetadata.java | 2 +- .../configurationsample/lombok/LombokSimpleDataProperties.java | 1 + .../boot/configurationsample/lombok/LombokSimpleProperties.java | 1 + .../springframework/boot/loader/data/RandomAccessDataFile.java | 1 + 4 files changed, 4 insertions(+), 1 deletion(-) diff --git a/spring-boot-tools/spring-boot-configuration-processor/src/main/java/org/springframework/boot/configurationprocessor/metadata/ConfigurationMetadata.java b/spring-boot-tools/spring-boot-configuration-processor/src/main/java/org/springframework/boot/configurationprocessor/metadata/ConfigurationMetadata.java index 6b82979535..2fdd46cf5e 100644 --- a/spring-boot-tools/spring-boot-configuration-processor/src/main/java/org/springframework/boot/configurationprocessor/metadata/ConfigurationMetadata.java +++ b/spring-boot-tools/spring-boot-configuration-processor/src/main/java/org/springframework/boot/configurationprocessor/metadata/ConfigurationMetadata.java @@ -179,7 +179,7 @@ public class ConfigurationMetadata { return first + "-" + second; } - private static List flattenValues(MultiValueMap map) { + private static > List flattenValues(MultiValueMap map) { List content = new ArrayList(); for (List values : map.values()) { content.addAll(values); diff --git a/spring-boot-tools/spring-boot-configuration-processor/src/test/java/org/springframework/boot/configurationsample/lombok/LombokSimpleDataProperties.java b/spring-boot-tools/spring-boot-configuration-processor/src/test/java/org/springframework/boot/configurationsample/lombok/LombokSimpleDataProperties.java index 6899811dba..d22ed82886 100644 --- a/spring-boot-tools/spring-boot-configuration-processor/src/test/java/org/springframework/boot/configurationsample/lombok/LombokSimpleDataProperties.java +++ b/spring-boot-tools/spring-boot-configuration-processor/src/test/java/org/springframework/boot/configurationsample/lombok/LombokSimpleDataProperties.java @@ -30,6 +30,7 @@ import lombok.Data; */ @Data @ConfigurationProperties(prefix = "data") +@SuppressWarnings("unused") public class LombokSimpleDataProperties { private final String id = "super-id"; diff --git a/spring-boot-tools/spring-boot-configuration-processor/src/test/java/org/springframework/boot/configurationsample/lombok/LombokSimpleProperties.java b/spring-boot-tools/spring-boot-configuration-processor/src/test/java/org/springframework/boot/configurationsample/lombok/LombokSimpleProperties.java index adf01fd108..551c802602 100644 --- a/spring-boot-tools/spring-boot-configuration-processor/src/test/java/org/springframework/boot/configurationsample/lombok/LombokSimpleProperties.java +++ b/spring-boot-tools/spring-boot-configuration-processor/src/test/java/org/springframework/boot/configurationsample/lombok/LombokSimpleProperties.java @@ -32,6 +32,7 @@ import lombok.Setter; @Getter @Setter @ConfigurationProperties(prefix = "simple") +@SuppressWarnings("unused") public class LombokSimpleProperties { private final String id = "super-id"; diff --git a/spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/data/RandomAccessDataFile.java b/spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/data/RandomAccessDataFile.java index 524c0491ee..f4ed545d15 100644 --- a/spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/data/RandomAccessDataFile.java +++ b/spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/data/RandomAccessDataFile.java @@ -243,6 +243,7 @@ public class RandomAccessDataFile implements RandomAccessData { this.files = new ConcurrentLinkedQueue(); } + @SuppressWarnings("resource") public RandomAccessFile acquire() throws IOException { try { this.available.acquire();