Skip to content

Commit

Permalink
ClassUtils: simplify getList method code
Browse files Browse the repository at this point in the history
  • Loading branch information
ctrueden committed Dec 17, 2019
1 parent 06aa06d commit 100351f
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/main/java/org/scijava/util/ClassUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -699,12 +699,8 @@ private static class CacheMap<T extends AnnotatedElement> extends
public List<T> getList(final Class<?> c,
final Class<? extends Annotation> annotationClass)
{
List<T> annotatedFields = null;
final Map<Class<? extends Annotation>, List<T>> annotationTypes = get(c);
if (annotationTypes != null) {
annotatedFields = annotationTypes.get(annotationClass);
}
return annotatedFields;
return annotationTypes == null ? null : annotationTypes.get(annotationClass);
}

/**
Expand Down

0 comments on commit 100351f

Please sign in to comment.