openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rmannibu...@apache.org
Subject svn commit: r1606373 - /openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/container/BeanManagerImpl.java
Date Sat, 28 Jun 2014 15:25:24 GMT
Author: rmannibucau
Date: Sat Jun 28 15:25:24 2014
New Revision: 1606373

URL: http://svn.apache.org/r1606373
Log:
checking @Vetoed for added beans by extension

Modified:
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/container/BeanManagerImpl.java

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/container/BeanManagerImpl.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/container/BeanManagerImpl.java?rev=1606373&r1=1606372&r2=1606373&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/container/BeanManagerImpl.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/container/BeanManagerImpl.java
Sat Jun 28 15:25:24 2014
@@ -42,6 +42,7 @@ import javax.enterprise.context.spi.Cont
 import javax.enterprise.context.spi.CreationalContext;
 import javax.enterprise.inject.Default;
 import javax.enterprise.inject.Stereotype;
+import javax.enterprise.inject.Vetoed;
 import javax.enterprise.inject.spi.*;
 import javax.inject.Scope;
 import javax.interceptor.InterceptorBinding;
@@ -1096,6 +1097,12 @@ public class BeanManagerImpl implements 
 
     public void addAdditionalAnnotatedType(AnnotatedType<?> annotatedType, String id)
     {
+        if (annotatedType.getAnnotation(Vetoed.class) != null)
+        {
+            // we could check package here too but would be a lost of time 99.99% of the
time
+            return;
+        }
+
         webBeansContext.getAnnotatedElementFactory().setAnnotatedType(annotatedType, id);
         ConcurrentMap<String, AnnotatedType<?>> annotatedTypes = additionalAnnotatedTypes.get(annotatedType.getJavaClass());
         if (annotatedTypes == null)



Mime
View raw message