Skip to content

Commit 65066bd

Browse files
committed
Fix Java 17 compiler warning about varargs
1 parent 70415b1 commit 65066bd

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

spring-beans/src/main/java/org/springframework/beans/factory/support/ManagedList.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ public ManagedList(int initialCapacity) {
6464
* @since 5.3.16
6565
*/
6666
@SafeVarargs
67+
@SuppressWarnings("varargs")
6768
public static <E> ManagedList<E> of(E... elements) {
6869
ManagedList<E> list = new ManagedList<>();
6970
Collections.addAll(list, elements);

spring-beans/src/main/java/org/springframework/beans/factory/support/ManagedSet.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ public ManagedSet(int initialCapacity) {
6363
* @since 5.3.16
6464
*/
6565
@SafeVarargs
66+
@SuppressWarnings("varargs")
6667
public static <E> ManagedSet<E> of(E... elements) {
6768
ManagedSet<E> set = new ManagedSet<>();
6869
Collections.addAll(set, elements);

0 commit comments

Comments
 (0)