Skip to content

Commit

Permalink
Makes test compatible with earlier JDK version
Browse files Browse the repository at this point in the history
  • Loading branch information
bric3 committed Jun 5, 2015
1 parent d407574 commit 528dbad
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/org/mockito/AnnotationsAreCopiedFromMockedTypeTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@ private AnnotatedElement firstParamOf(Method method) {
final Annotation[] firstParamAnnotations = method.getParameterAnnotations()[0];

return new AnnotatedElement() {
@Override
public boolean isAnnotationPresent(Class<? extends Annotation> annotationClass) {
return getAnnotation(annotationClass) != null;
}

@Override
@SuppressWarnings("unchecked")
public <T extends Annotation> T getAnnotation(Class<T> annotationClass) {
Expand Down

0 comments on commit 528dbad

Please sign in to comment.