Skip to content

Commit 100351f

Browse files
committed
ClassUtils: simplify getList method code
1 parent 06aa06d commit 100351f

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/main/java/org/scijava/util/ClassUtils.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -699,12 +699,8 @@ private static class CacheMap<T extends AnnotatedElement> extends
699699
public List<T> getList(final Class<?> c,
700700
final Class<? extends Annotation> annotationClass)
701701
{
702-
List<T> annotatedFields = null;
703702
final Map<Class<? extends Annotation>, List<T>> annotationTypes = get(c);
704-
if (annotationTypes != null) {
705-
annotatedFields = annotationTypes.get(annotationClass);
706-
}
707-
return annotatedFields;
703+
return annotationTypes == null ? null : annotationTypes.get(annotationClass);
708704
}
709705

710706
/**

0 commit comments

Comments
 (0)