From 91d1383e931658754d69a53e0f6866641ffe0ddb Mon Sep 17 00:00:00 2001 From: Sam Brannen Date: Mon, 3 Aug 2020 13:44:02 +0200 Subject: [PATCH] Use Spliterators.emptySpliterator() in TypeMappedAnnotations For greater clarity, this commit invokes Spliterators.emptySpliterator() directly instead of going through java.util.Collections.EmptyList. --- .../core/annotation/TypeMappedAnnotations.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spring-core/src/main/java/org/springframework/core/annotation/TypeMappedAnnotations.java b/spring-core/src/main/java/org/springframework/core/annotation/TypeMappedAnnotations.java index ba1ae30a00..ddd078b25c 100644 --- a/spring-core/src/main/java/org/springframework/core/annotation/TypeMappedAnnotations.java +++ b/spring-core/src/main/java/org/springframework/core/annotation/TypeMappedAnnotations.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2019 the original author or authors. + * Copyright 2002-2020 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -211,7 +211,7 @@ final class TypeMappedAnnotations implements MergedAnnotations { @Override public Spliterator> spliterator() { if (this.annotationFilter == AnnotationFilter.ALL) { - return Collections.> emptyList().spliterator(); + return Spliterators.emptySpliterator(); } return spliterator(null); }