Skip to content

Commit

Permalink
make some tests for 9.4
Browse files Browse the repository at this point in the history
git-svn-id: http://anonsvn.jboss.org/repos/weld/ri/trunk@2342 1c488680-804c-0410-94cd-c6b725194a0e
  • Loading branch information
Victor Yarmolovich committed Apr 8, 2009
1 parent 60138c7 commit 63f8a4d
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions impl/src/main/java/org/jboss/webbeans/xml/XmlParser.java
Expand Up @@ -200,7 +200,8 @@ private void checkForInterceptorBindingTypeChildren(Element element)
{
Element child = (Element)elIterator.next();
Class<? extends Annotation> clazz = ParseXmlHelper.loadAnnotationClass(child, Annotation.class, environment, packagesMap);
if(!clazz.isAnnotationPresent(InterceptorBindingType.class))
if(!child.getName().equalsIgnoreCase(XmlConstants.INTERCEPTOR_BINDING_TYPE) &&
!clazz.isAnnotationPresent(InterceptorBindingType.class))
throw new DefinitionException("Direct child <" + child.getName() + "> of interceptor binding type <" + element.getName() +
"> declaration must be interceptor binding type");

Expand All @@ -214,11 +215,12 @@ private void checkForStereotypeChildren(Element stereotypeElement)
{
Element stereotypeChild = (Element)elIterator.next();
Class<? extends Annotation> stereotypeClass = ParseXmlHelper.loadAnnotationClass(stereotypeChild, Annotation.class, environment, packagesMap);
if(stereotypeClass.isAnnotationPresent(ScopeType.class) ||
if(stereotypeChild.getName().equalsIgnoreCase(XmlConstants.STEREOTYPE) ||
stereotypeClass.isAnnotationPresent(ScopeType.class) ||
stereotypeClass.isAnnotationPresent(DeploymentType.class) ||
stereotypeClass.isAnnotationPresent(InterceptorBindingType.class) ||
stereotypeClass.isAnnotationPresent(Named.class))
return;
continue;
throw new DefinitionException("Direct child <" + stereotypeChild.getName() + "> of stereotype <" + stereotypeElement.getName() +
"> declaration must be scope type, or deployment type, or interceptor binding type, or javax.annotation.Named");

Expand Down

0 comments on commit 63f8a4d

Please sign in to comment.