openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From strub...@apache.org
Subject svn commit: r1607458 - in /openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans: component/creation/BeanAttributesBuilder.java portable/AbstractAnnotated.java portable/OwbAnnotated.java
Date Wed, 02 Jul 2014 19:45:12 GMT
Author: struberg
Date: Wed Jul  2 19:45:12 2014
New Revision: 1607458

URL: http://svn.apache.org/r1607458
Log:
always use AnnotatedType.getTypeClosures()

regardless whethere this is an OWB AT or a 3rd party one.

Removed:
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/portable/OwbAnnotated.java
Modified:
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/creation/BeanAttributesBuilder.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/portable/AbstractAnnotated.java

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/creation/BeanAttributesBuilder.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/creation/BeanAttributesBuilder.java?rev=1607458&r1=1607457&r2=1607458&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/creation/BeanAttributesBuilder.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/creation/BeanAttributesBuilder.java
Wed Jul  2 19:45:12 2014
@@ -56,11 +56,9 @@ import javax.enterprise.inject.spi.Defin
 
 import org.apache.webbeans.inject.AlternativesManager;
 import org.apache.webbeans.logger.WebBeansLoggerFacade;
-import org.apache.webbeans.portable.OwbAnnotated;
 import org.apache.webbeans.util.AnnotationUtil;
 import org.apache.webbeans.util.Asserts;
 import org.apache.webbeans.util.ClassUtil;
-import org.apache.webbeans.util.GenericsUtil;
 import org.apache.webbeans.util.WebBeansUtil;
 
 /**
@@ -137,20 +135,15 @@ public abstract class BeanAttributesBuil
         }
         else
         {
-            // if already computed then reuse it otherwise
-            Set<Type> types = OwbAnnotated.class.isInstance(annotated) ?
-                                    annotated.getTypeClosure() : GenericsUtil.getTypeClosure(baseType,
baseType);
+            Set<Type> types = annotated.getTypeClosure();
             this.types.addAll(types);
             Set<String> ignored = webBeansContext.getOpenWebBeansConfiguration().getIgnoredInterfaces();
-            if (!ignored.isEmpty())
+            for (Iterator<Type> i = this.types.iterator(); i.hasNext();)
             {
-                for (Iterator<Type> i = this.types.iterator(); i.hasNext();)
+                Type t = i.next();
+                if (t instanceof Class && ignored.contains(((Class<?>)t).getName()))
                 {
-                    Type t = i.next();
-                    if (t instanceof Class && ignored.contains(((Class<?>)t).getName()))
-                    {
-                        i.remove();
-                    }
+                    i.remove();
                 }
             }
         }

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/portable/AbstractAnnotated.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/portable/AbstractAnnotated.java?rev=1607458&r1=1607457&r2=1607458&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/portable/AbstractAnnotated.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/portable/AbstractAnnotated.java
Wed Jul  2 19:45:12 2014
@@ -26,6 +26,7 @@ import java.util.Iterator;
 import java.util.Set;
 
 import javax.enterprise.inject.Typed;
+import javax.enterprise.inject.spi.Annotated;
 
 import org.apache.webbeans.config.WebBeansContext;
 import org.apache.webbeans.exception.WebBeansConfigurationException;
@@ -38,7 +39,7 @@ import org.apache.webbeans.util.Generics
  * 
  * @version $Rev$ $Date$
  */
-abstract class AbstractAnnotated implements OwbAnnotated
+abstract class AbstractAnnotated implements Annotated
 {
     /**Base type of an annotated element*/
     private final Type baseType;



Mime
View raw message