diff --git a/build.gradle b/build.gradle index cbcaec2dbc..25c87ee0ed 100644 --- a/build.gradle +++ b/build.gradle @@ -100,7 +100,7 @@ configure(allprojects) { project -> ] compileTestJava.options*.compilerArgs = [ - "-Xlint:serial", "-Xlint:varargs", "-Xlint:cast", "-Xlint:classfile", + "-Xlint:serial", "-Xlint:-varargs", "-Xlint:cast", "-Xlint:classfile", "-Xlint:dep-ann", "-Xlint:divzero", "-Xlint:empty", "-Xlint:finally", "-Xlint:overrides", "-Xlint:path", "-Xlint:processing", "-Xlint:static", "-Xlint:try", "-Xlint:-fallthrough", "-Xlint:-rawtypes", "-Xlint:-deprecation", diff --git a/spring-core/src/test/java/org/springframework/core/annotation/AnnotatedElementUtilsTests.java b/spring-core/src/test/java/org/springframework/core/annotation/AnnotatedElementUtilsTests.java index 34db68bb1c..ed0ee2299e 100644 --- a/spring-core/src/test/java/org/springframework/core/annotation/AnnotatedElementUtilsTests.java +++ b/spring-core/src/test/java/org/springframework/core/annotation/AnnotatedElementUtilsTests.java @@ -644,6 +644,13 @@ public class AnnotatedElementUtilsTests { } @SafeVarargs + // The following "varargs" suppression is necessary for javac from OpenJDK + // (1.8.0_60-b27); however, Eclipse warns that it's unnecessary. See the following + // Eclipse issues for details. + // + // https://bugs.eclipse.org/bugs/show_bug.cgi?id=344783 + // https://bugs.eclipse.org/bugs/show_bug.cgi?id=349669#c10 + // @SuppressWarnings("varargs") private static T[] asArray(T... arr) { return arr; }