Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
Simplify annotation check
Browse files Browse the repository at this point in the history
  • Loading branch information
seanf committed Sep 12, 2013
1 parent cb2adae commit 7a3bc99
Showing 1 changed file with 2 additions and 13 deletions.
Expand Up @@ -105,7 +105,8 @@ protected Class getAnnotatedInterface(Class<? extends Annotation> annotation,
Component seamComponent)
{
if (annotation == javax.ws.rs.Path.class &&
hasAnnotation(seamComponent.getBeanClass(), IgnoreInterfacePath.class))
seamComponent.getBeanClass().isAnnotationPresent(
IgnoreInterfacePath.class))
{
return null;
}
Expand All @@ -115,16 +116,4 @@ protected Class getAnnotatedInterface(Class<? extends Annotation> annotation,
}
}

private static boolean hasAnnotation(Class clazz,
Class<? extends Annotation> type)
{
for (Annotation annotation : clazz.getAnnotations())
{
if (annotation.annotationType() == type)
{
return true;
}
}
return false;
}
}

0 comments on commit 7a3bc99

Please sign in to comment.