openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rmannibu...@apache.org
Subject svn commit: r1504374 - in /openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans: component/creation/ProducerMethodBeansBuilder.java util/WebBeansUtil.java
Date Thu, 18 Jul 2013 06:50:04 GMT
Author: rmannibucau
Date: Thu Jul 18 06:50:03 2013
New Revision: 1504374

URL: http://svn.apache.org/r1504374
Log:
OWB-885 better ejb handling in ProducerMethodBeansBuilder + slight clean up of jb handling
in WebBeansUtil for specialization

Modified:
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/creation/ProducerMethodBeansBuilder.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/WebBeansUtil.java

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/creation/ProducerMethodBeansBuilder.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/creation/ProducerMethodBeansBuilder.java?rev=1504374&r1=1504373&r2=1504374&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/creation/ProducerMethodBeansBuilder.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/creation/ProducerMethodBeansBuilder.java
Thu Jul 18 06:50:03 2013
@@ -19,7 +19,6 @@
 package org.apache.webbeans.component.creation;
 
 import org.apache.webbeans.component.BeanAttributesImpl;
-import org.apache.webbeans.component.EnterpriseBeanMarker;
 import org.apache.webbeans.component.InjectionTargetBean;
 import org.apache.webbeans.component.ProducerMethodBean;
 import org.apache.webbeans.config.WebBeansContext;
@@ -75,10 +74,8 @@ public class ProducerMethodBeansBuilder<
         
         for(AnnotatedMethod<? super T> annotatedMethod: annotatedMethods)
         {
-            boolean enterprise = EnterpriseBeanMarker.class.isInstance(bean);
             if(annotatedMethod.isAnnotationPresent(Produces.class) &&
-                (annotatedMethod.getJavaMember().getDeclaringClass().equals(annotatedType.getJavaClass())
-                || (enterprise && annotatedType.getJavaClass().isAssignableFrom(annotatedType.getJavaClass()))))
+                annotatedMethod.getJavaMember().getDeclaringClass().equals(annotatedType.getJavaClass()))
             {
                 checkProducerMethodForDeployment(annotatedMethod);
                 boolean specialize = false;

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/WebBeansUtil.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/WebBeansUtil.java?rev=1504374&r1=1504373&r2=1504374&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/WebBeansUtil.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/WebBeansUtil.java
Thu Jul 18 06:50:03 2013
@@ -708,9 +708,7 @@ public final class WebBeansUtil
 
                 if(!(candidate instanceof NewBean))
                 {
-                    if(candidate.getReturnType().equals(superClass)
-                            || (EnterpriseBeanMarker.class.isInstance(candidate)
-                                && superClass.isAssignableFrom(candidate.getBeanClass())))
+                    if(candidate.getReturnType().equals(superClass))
                     {
                         superBean = candidates;
                         break;
@@ -1002,14 +1000,8 @@ public final class WebBeansUtil
         {
             AbstractOwbBean<?> bean = (AbstractOwbBean<?>)it.next();
 
-            boolean enterprise = false;
-            if(bean instanceof EnterpriseBeanMarker)
-            {
-                enterprise = true;
-            }
-
-            if (bean.getTypes().contains(clazz) ||
-                    (enterprise && clazz.isAssignableFrom(bean.getBeanClass())))
+            if (bean.getTypes().contains(clazz)
+                || (EnterpriseBeanMarker.class.isInstance(bean) && bean.getBeanClass().isAssignableFrom(clazz)))
             {
                 if(annotate)
                 {



Mime
View raw message