[jboss-cvs] JBossAS SVN: r71559 - projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/integration.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue Apr 1 11:12:11 EDT 2008
Author: alesj
Date: 2008-04-01 11:12:11 -0400 (Tue, 01 Apr 2008)
New Revision: 71559
Modified:
projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/integration/AOPConstructorJoinpoint.java
Log:
Fix how we do non-annotations metadata check.
Modified: projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/integration/AOPConstructorJoinpoint.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/integration/AOPConstructorJoinpoint.java 2008-04-01 15:04:24 UTC (rev 71558)
+++ projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/integration/AOPConstructorJoinpoint.java 2008-04-01 15:12:11 UTC (rev 71559)
@@ -23,10 +23,7 @@
import java.lang.annotation.Annotation;
import java.lang.reflect.Constructor;
-import java.util.Arrays;
-import java.util.HashSet;
import java.util.List;
-import java.util.Set;
import org.jboss.aop.Advisor;
import org.jboss.aop.AspectManager;
@@ -205,17 +202,18 @@
MetaData levelMetaData = metaData.getScopeMetaData(level);
if (levelMetaData != null && levelMetaData.isEmpty() == false)
{
- Set<Object> checkSet = new HashSet<Object>();
Object[] allMetaData = levelMetaData.getMetaData();
Annotation[] annotations = levelMetaData.getAnnotations();
- // all meta data is not null, since instance metadata is not empty
- checkSet.addAll(Arrays.asList(allMetaData));
- checkSet.removeAll(Arrays.asList(annotations));
+ // all meta data is not null, since level metadata is not empty
+ int allSize = allMetaData.length;
+ int annotationsSize = annotations != null ? annotations.length : 0;
// do we have something else than annotations
- if (checkSet.isEmpty() == false)
+ if (allSize > annotationsSize)
+ {
return true;
- else
+ }
+ else if (annotationsSize > 0)
{
// do we have an annotation that's not marked with IA
for (Annotation annotation : annotations)
More information about the jboss-cvs-commits
mailing list