Use Spliterators.emptySpliterator() in TypeMappedAnnotations

For greater clarity, this commit invokes Spliterators.emptySpliterator()
directly instead of going through java.util.Collections.EmptyList.
This commit is contained in:
Sam Brannen 2020-08-03 13:44:02 +02:00
parent 969aa8ad47
commit 91d1383e93
1 changed files with 2 additions and 2 deletions

View File

@ -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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -211,7 +211,7 @@ final class TypeMappedAnnotations implements MergedAnnotations {
@Override @Override
public Spliterator<MergedAnnotation<Annotation>> spliterator() { public Spliterator<MergedAnnotation<Annotation>> spliterator() {
if (this.annotationFilter == AnnotationFilter.ALL) { if (this.annotationFilter == AnnotationFilter.ALL) {
return Collections.<MergedAnnotation<Annotation>> emptyList().spliterator(); return Spliterators.emptySpliterator();
} }
return spliterator(null); return spliterator(null);
} }