openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject svn commit: r1476331 - in /openwebbeans/trunk: webbeans-ejb/src/main/java/org/apache/webbeans/ejb/common/component/ webbeans-impl/src/main/java/org/apache/webbeans/component/ webbeans-impl/src/main/java/org/apache/webbeans/component/third/ webbeans-imp...
Date Fri, 26 Apr 2013 18:29:40 GMT
Author: arne
Date: Fri Apr 26 18:28:00 2013
New Revision: 1476331

URL: http://svn.apache.org/r1476331
Log:
OWB-765: Fixed nullable handling

Modified:
    openwebbeans/trunk/webbeans-ejb/src/main/java/org/apache/webbeans/ejb/common/component/BaseEjbBean.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/AbstractOwbBean.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/AbstractProducerBean.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/BeanAttributesImpl.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/BeanManagerBean.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/BuildInOwbBean.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/ConversationBean.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/DecoratorBean.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/EventBean.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/ExtensionBean.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/InjectionPointBean.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/InjectionTargetBean.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/InstanceBean.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/InterceptorBean.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/ProducerFieldBean.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/ProducerMethodBean.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/third/ThirdpartyBeanImpl.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/WebBeansUtil.java
    openwebbeans/trunk/webbeans-jms/src/main/java/org/apache/webbeans/jms/component/JmsBean.java

Modified: openwebbeans/trunk/webbeans-ejb/src/main/java/org/apache/webbeans/ejb/common/component/BaseEjbBean.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-ejb/src/main/java/org/apache/webbeans/ejb/common/component/BaseEjbBean.java?rev=1476331&r1=1476330&r2=1476331&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-ejb/src/main/java/org/apache/webbeans/ejb/common/component/BaseEjbBean.java
(original)
+++ openwebbeans/trunk/webbeans-ejb/src/main/java/org/apache/webbeans/ejb/common/component/BaseEjbBean.java
Fri Apr 26 18:28:00 2013
@@ -22,6 +22,7 @@ import org.apache.webbeans.component.Bea
 import org.apache.webbeans.component.EnterpriseBeanMarker;
 import org.apache.webbeans.component.InjectionTargetBean;
 import org.apache.webbeans.component.WebBeansType;
+import org.apache.webbeans.component.spi.BeanAttributes;
 import org.apache.webbeans.config.WebBeansContext;
 import org.apache.webbeans.container.InjectionTargetFactoryImpl;
 import org.apache.webbeans.util.ClassUtil;
@@ -56,7 +57,7 @@ public abstract class BaseEjbBean<T> ext
     protected BaseEjbBean(WebBeansContext webBeansContext,
                           SessionBeanType type,
                           AnnotatedType<T> annotatedType,
-                          BeanAttributesImpl<T> beanAttributes,
+                          BeanAttributes<T> beanAttributes,
                           Class<T> beanClass,
                           InjectionTargetFactoryImpl<T> factory)
     {

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/AbstractOwbBean.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/AbstractOwbBean.java?rev=1476331&r1=1476330&r2=1476331&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/AbstractOwbBean.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/AbstractOwbBean.java
Fri Apr 26 18:28:00 2013
@@ -33,6 +33,7 @@ import javax.enterprise.inject.spi.Injec
 import javax.enterprise.inject.spi.InjectionTarget;
 import javax.enterprise.inject.spi.Producer;
 
+import org.apache.webbeans.component.spi.BeanAttributes;
 import org.apache.webbeans.config.OWBLogConst;
 import org.apache.webbeans.config.WebBeansContext;
 import org.apache.webbeans.context.creational.CreationalContextImpl;
@@ -74,10 +75,11 @@ public abstract class AbstractOwbBean<T>
 
     protected AbstractOwbBean(WebBeansContext webBeansContext,
                               WebBeansType webBeansType,
-                              BeanAttributesImpl<T> beanAttributes,
-                              Class<?> beanClass)
+                              BeanAttributes<T> beanAttributes,
+                              Class<?> beanClass,
+                              boolean nullable)
     {
-        super(beanAttributes);
+        super(beanAttributes, nullable);
         this.webBeansType = webBeansType;
         this.beanClass = beanClass;
         this.webBeansContext = webBeansContext;

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/AbstractProducerBean.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/AbstractProducerBean.java?rev=1476331&r1=1476330&r2=1476331&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/AbstractProducerBean.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/AbstractProducerBean.java
Fri Apr 26 18:28:00 2013
@@ -25,7 +25,9 @@ import javax.enterprise.context.spi.Crea
 import javax.enterprise.inject.spi.PassivationCapable;
 import javax.enterprise.inject.spi.Producer;
 
+import org.apache.webbeans.component.spi.BeanAttributes;
 import org.apache.webbeans.component.spi.ProducerFactory;
+import org.apache.webbeans.config.WebBeansContext;
 
 
 /**
@@ -34,10 +36,8 @@ import org.apache.webbeans.component.spi
  * @version $Rev$ $Date$
  * @param <T> bean type info
  */
-public abstract class AbstractProducerBean<T> extends AbstractOwbBean<T> implements
IBeanHasParent<T>, PassivationCapable
+public abstract class AbstractProducerBean<T> extends AbstractOwbBean<T> implements
PassivationCapable
 {
-    /** Owner of the producer field component */
-    protected InjectionTargetBean<?> ownerComponent;
     private Class<T> returnType;
     private Producer<T> producer;
 
@@ -47,14 +47,14 @@ public abstract class AbstractProducerBe
      * @param returnType bean type info
      * @param ownerComponent owner bean
      */
-    protected AbstractProducerBean(InjectionTargetBean<?> ownerComponent,
+    protected AbstractProducerBean(Class<?> ownerBeanClass,
+                                   WebBeansContext webBeansContext,
                                    WebBeansType webBeansType,
-                                   BeanAttributesImpl<T> beanAttributes,
+                                   BeanAttributes<T> beanAttributes,
                                    Class<T> returnType,
                                    ProducerFactory<?> producerFactory)
     {
-        super(ownerComponent.getWebBeansContext(), webBeansType, beanAttributes, ownerComponent.getBeanClass());
-        this.ownerComponent = ownerComponent;
+        super(webBeansContext, webBeansType, beanAttributes, ownerBeanClass, !returnType.isPrimitive());
         this.returnType = returnType;
         this.producer = producerFactory.createProducer(this);
     }
@@ -65,14 +65,6 @@ public abstract class AbstractProducerBe
         return producer;
     }
 
-    /**
-     * {@inheritDoc}
-     */
-    public InjectionTargetBean<?> getParent()
-    {
-        return ownerComponent;
-    }
-
     @Override
     public Class<T> getReturnType()
     {
@@ -101,20 +93,4 @@ public abstract class AbstractProducerBe
         
         return false;
     }
-
-    @Override
-    public int hashCode()
-    {
-        return super.hashCode() ^ ownerComponent.hashCode();
-    }
-
-    public boolean equals(Object object)
-    {
-        if (!super.equals(object))
-        {
-            return false;
-        }
-        AbstractProducerBean<?> other = (AbstractProducerBean<?>) object;
-        return ownerComponent.equals(other.ownerComponent);
-    }
 }

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/BeanAttributesImpl.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/BeanAttributesImpl.java?rev=1476331&r1=1476330&r2=1476331&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/BeanAttributesImpl.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/BeanAttributesImpl.java
Fri Apr 26 18:28:00 2013
@@ -54,13 +54,13 @@ public class BeanAttributesImpl<T> imple
              bean.isAlternative());
     }
 
-    public BeanAttributesImpl(BeanAttributesImpl<T> beanAttributes)
+    public BeanAttributesImpl(BeanAttributes<T> beanAttributes, boolean nullable)
     {
         this(beanAttributes.getTypes(),
              beanAttributes.getQualifiers(),
              beanAttributes.getScope(),
              beanAttributes.getName(),
-             beanAttributes.isNullable(),
+             nullable,
              beanAttributes.getStereotypes(),
              beanAttributes.isAlternative());
     }

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/BeanManagerBean.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/BeanManagerBean.java?rev=1476331&r1=1476330&r2=1476331&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/BeanManagerBean.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/BeanManagerBean.java
Fri Apr 26 18:28:00 2013
@@ -35,6 +35,7 @@ public class BeanManagerBean extends Bui
               WebBeansType.MANAGER,
               new BeanAttributesImpl<BeanManager>(CollectionUtil.<Type>unmodifiableSet(BeanManager.class,
Object.class), AnnotationUtil.DEFAULT_AND_ANY_ANNOTATION),
               BeanManager.class,
+              false,
               new SimpleProducerFactory<BeanManager>(new BeanManagerProducer(webBeansContext)));
     }
     

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/BuildInOwbBean.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/BuildInOwbBean.java?rev=1476331&r1=1476330&r2=1476331&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/BuildInOwbBean.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/BuildInOwbBean.java
Fri Apr 26 18:28:00 2013
@@ -35,7 +35,7 @@ public abstract class BuildInOwbBean<T> 
 
     protected BuildInOwbBean(WebBeansContext webBeansContext, WebBeansType webBeansType,
Class<T> returnType, ProducerFactory<T> producerFactory)
     {
-        this(webBeansContext, webBeansType, new BeanAttributesImpl<T>(CollectionUtil.<Type>unmodifiableSet(returnType,
Object.class)), returnType, producerFactory);
+        this(webBeansContext, webBeansType, new BeanAttributesImpl<T>(CollectionUtil.<Type>unmodifiableSet(returnType,
Object.class)), returnType, false, producerFactory);
     }
     
     protected BuildInOwbBean(
@@ -43,9 +43,10 @@ public abstract class BuildInOwbBean<T> 
             WebBeansType webBeansType,
             BeanAttributesImpl<T> beanAttributes,
             Class<T> returnType,
+            boolean nullable,
             ProducerFactory<T> producerFactory)
     {
-        super(webBeansContext, webBeansType, beanAttributes, returnType);
+        super(webBeansContext, webBeansType, beanAttributes, returnType, nullable);
         Asserts.assertNotNull(producerFactory, "ProducerFactory may not be null");
         this.producer = producerFactory.createProducer(this);
     }

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/ConversationBean.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/ConversationBean.java?rev=1476331&r1=1476330&r2=1476331&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/ConversationBean.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/ConversationBean.java
Fri Apr 26 18:28:00 2013
@@ -55,6 +55,7 @@ public class ConversationBean extends Bu
                       Collections.<Class<? extends Annotation>>emptySet(),
                       false),
               ConversationImpl.class,
+              false,
               new SimpleProducerFactory<ConversationImpl>(
                       new ConversationProducer(webBeansContext.getAnnotatedElementFactory().newAnnotatedType(ConversationImpl.class),
webBeansContext)));
         setEnabled(true);

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/DecoratorBean.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/DecoratorBean.java?rev=1476331&r1=1476330&r2=1476331&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/DecoratorBean.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/DecoratorBean.java
Fri Apr 26 18:28:00 2013
@@ -24,6 +24,7 @@ import java.lang.annotation.Annotation;
 import java.lang.reflect.Type;
 import java.util.Set;
 
+import org.apache.webbeans.component.spi.BeanAttributes;
 import org.apache.webbeans.config.WebBeansContext;
 import org.apache.webbeans.container.DecoratorInjectionTargetFactory;
 
@@ -51,7 +52,7 @@ public class DecoratorBean<T> extends In
     public DecoratorBean(WebBeansContext webBeansContext,
                          WebBeansType webBeansType,
                          AnnotatedType<T> annotatedType,
-                         BeanAttributesImpl<T> beanAttributes,
+                         BeanAttributes<T> beanAttributes,
                          Class<T> beanClass)
     {
         super(webBeansContext, webBeansType, annotatedType, beanAttributes, beanClass, new
DecoratorInjectionTargetFactory<T>(annotatedType, webBeansContext));

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/EventBean.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/EventBean.java?rev=1476331&r1=1476330&r2=1476331&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/EventBean.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/EventBean.java
Fri Apr 26 18:28:00 2013
@@ -46,6 +46,7 @@ public class EventBean<T> extends BuildI
               WebBeansType.OBSERVABLE,
               new BeanAttributesImpl<Event<T>>(CollectionUtil.<Type>unmodifiableSet(new
TypeLiteral<Event<T>>() {}.getRawType(), Object.class)),
               new TypeLiteral<Event<T>>(){}.getRawType(),
+              false,
               new SimpleProducerFactory<Event<T>>(new EventProducer<T>(webBeansContext)));
     }
     

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/ExtensionBean.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/ExtensionBean.java?rev=1476331&r1=1476330&r2=1476331&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/ExtensionBean.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/ExtensionBean.java
Fri Apr 26 18:28:00 2013
@@ -47,6 +47,7 @@ public class ExtensionBean<T> extends Bu
                         AnnotationUtil.DEFAULT_AND_ANY_ANNOTATION,
                         ApplicationScoped.class),
                 returnType,
+                false,
                 new ExtensionProducerFactory<T>(webBeansContext.getAnnotatedElementFactory().getAnnotatedType(returnType),
webBeansContext));
     }
 }

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/InjectionPointBean.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/InjectionPointBean.java?rev=1476331&r1=1476330&r2=1476331&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/InjectionPointBean.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/InjectionPointBean.java
Fri Apr 26 18:28:00 2013
@@ -34,6 +34,7 @@ public class InjectionPointBean extends 
               WebBeansType.INJECTIONPOINT,
               new BeanAttributesImpl<InjectionPoint>(CollectionUtil.<Type>unmodifiableSet(InjectionPoint.class,
Object.class)),
               InjectionPoint.class,
+              false,
               new SimpleProducerFactory<InjectionPoint>(new InjectionPointProducer()));
     }
 

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/InjectionTargetBean.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/InjectionTargetBean.java?rev=1476331&r1=1476330&r2=1476331&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/InjectionTargetBean.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/InjectionTargetBean.java
Fri Apr 26 18:28:00 2013
@@ -28,6 +28,7 @@ import java.util.Map;
 
 import javax.enterprise.inject.spi.AnnotatedType;
 
+import org.apache.webbeans.component.spi.BeanAttributes;
 import org.apache.webbeans.config.WebBeansContext;
 import org.apache.webbeans.container.InjectionTargetFactoryImpl;
 
@@ -57,7 +58,7 @@ public abstract class InjectionTargetBea
     protected InjectionTargetBean(WebBeansContext webBeansContext,
             WebBeansType webBeansType,
             AnnotatedType<T> annotatedType,
-            BeanAttributesImpl<T> beanAttributes,
+            BeanAttributes<T> beanAttributes,
             Class<T> beanClass)
     {
         this(webBeansContext, webBeansType, annotatedType, beanAttributes, beanClass, new
InjectionTargetFactoryImpl<T>(annotatedType, webBeansContext));
@@ -69,11 +70,11 @@ public abstract class InjectionTargetBea
     protected InjectionTargetBean(WebBeansContext webBeansContext,
                                   WebBeansType webBeansType,
                                   AnnotatedType<T> annotatedType,
-                                  BeanAttributesImpl<T> beanAttributes,
+                                  BeanAttributes<T> beanAttributes,
                                   Class<T> beanClass,
                                   InjectionTargetFactoryImpl<T> factory)
     {
-        super(webBeansContext, webBeansType, beanAttributes, beanClass);
+        super(webBeansContext, webBeansType, beanAttributes, beanClass, false);
         Asserts.assertNotNull(annotatedType, "AnnotatedType may not be null");
         this.annotatedType = annotatedType;
         this.injectionTarget = factory.createInjectionTarget(this);

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/InstanceBean.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/InstanceBean.java?rev=1476331&r1=1476330&r2=1476331&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/InstanceBean.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/InstanceBean.java
Fri Apr 26 18:28:00 2013
@@ -42,6 +42,7 @@ public class InstanceBean<T> extends Bui
                       new TypeLiteral<Provider<T>>() {}.getRawType(), 
                       Object.class)),
               new TypeLiteral<Instance<T>>(){}.getRawType(),
+              false,
               new SimpleProducerFactory<Instance<T>>(
                       new InstanceProducer<T>(new TypeLiteral<Instance<T>>(){}.getRawType(),
AnnotationUtil.DEFAULT_AND_ANY_ANNOTATION, webBeansContext)));
     }

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/InterceptorBean.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/InterceptorBean.java?rev=1476331&r1=1476330&r2=1476331&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/InterceptorBean.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/InterceptorBean.java
Fri Apr 26 18:28:00 2013
@@ -29,6 +29,7 @@ import java.lang.reflect.Method;
 import java.util.Collections;
 import java.util.Map;
 
+import org.apache.webbeans.component.spi.BeanAttributes;
 import org.apache.webbeans.config.WebBeansContext;
 import org.apache.webbeans.container.InjectionTargetFactoryImpl;
 import org.apache.webbeans.container.InterceptorInjectionTargetFactory;
@@ -57,7 +58,7 @@ public abstract class InterceptorBean<T>
 
     protected InterceptorBean(WebBeansContext webBeansContext,
                                   AnnotatedType<T> annotatedType,
-                                  BeanAttributesImpl<T> beanAttributes,
+                                  BeanAttributes<T> beanAttributes,
                                   Class<T> beanClass,
                                   Map<InterceptionType, Method[]> interceptionMethods,
                                   InjectionTargetFactoryImpl<T> factory)

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/ProducerFieldBean.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/ProducerFieldBean.java?rev=1476331&r1=1476330&r2=1476331&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/ProducerFieldBean.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/ProducerFieldBean.java
Fri Apr 26 18:28:00 2013
@@ -32,7 +32,7 @@ import org.apache.webbeans.util.WebBeans
  * 
  * @param <T> Type of the field decleration
  */
-public class ProducerFieldBean<T> extends AbstractProducerBean<T> implements
IBeanHasParent<T>
+public class ProducerFieldBean<T> extends AbstractProducerBean<T>
 {
 
     /** Producer field that defines the component */
@@ -45,7 +45,7 @@ public class ProducerFieldBean<T> extend
      */
     public ProducerFieldBean(InjectionTargetBean<?> ownerComponent, BeanAttributesImpl<T>
beanAttributes, Class<T> returnType, ProducerFactory<T> producerFactory)
     {
-        super(ownerComponent, WebBeansType.PRODUCERFIELD, beanAttributes, returnType, producerFactory);
+        super(ownerComponent.getBeanClass(), ownerComponent.getWebBeansContext(), WebBeansType.PRODUCERFIELD,
beanAttributes, returnType, producerFactory);
     }
 
     /**
@@ -95,7 +95,7 @@ public class ProducerFieldBean<T> extend
                               " return type in the component implementation class : %s" +
                               " scope must be @Dependent to create null instance";
         WebBeansUtil.checkNullInstance(instance, getScope(), errorMessage, producerField.getName(),
-                ownerComponent.getReturnType().getName());
+                getBeanClass().getName());
     }
 
     /**
@@ -109,7 +109,7 @@ public class ProducerFieldBean<T> extend
                               " must be Serializable";
         getWebBeansContext().getWebBeansUtil().checkSerializableScopeType(getScope(),
                 ClassUtil.isClassAssignable(Serializable.class, getReturnType()), errorMessage,
producerField.getName(), 
-                ownerComponent.getReturnType().getName(), getScope().getName());
+                getBeanClass().getName(), getScope().getName());
     }
     
     @Override

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/ProducerMethodBean.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/ProducerMethodBean.java?rev=1476331&r1=1476330&r2=1476331&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/ProducerMethodBean.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/ProducerMethodBean.java
Fri Apr 26 18:28:00 2013
@@ -56,7 +56,7 @@ public class ProducerMethodBean<T> exten
                                   Class<T> returnType,
                                   MethodProducerFactory<P> producerFactory)
     {
-        super(ownerComponent, WebBeansType.PRODUCERMETHOD, beanAttributes, returnType, producerFactory);
+        super(ownerComponent.getBeanClass(), ownerComponent.getWebBeansContext(), WebBeansType.PRODUCERMETHOD,
beanAttributes, returnType, producerFactory);
     }
 
     /**
@@ -96,7 +96,7 @@ public class ProducerMethodBean<T> exten
         {
             throw new WebBeansConfigurationException("There are multiple disposal method
for producer method " +
                     "component with name : " + getName() + " with implementation class "
+
-                    getParent().getReturnType().getName() + " with disposal method name :
" +
+                    getBeanClass().getName() + " with disposal method name : " +
                     disposalMethod.getName());
         }
         this.disposalMethod = disposalMethod;
@@ -136,7 +136,7 @@ public class ProducerMethodBean<T> exten
                               " return type in the component implementation class : %s" +
                               " scope type must be @Dependent to create null instance";
         WebBeansUtil.checkNullInstance(instance, getScope(), errorMessage, creatorMethod.getName(),
-                ownerComponent.getReturnType().getName());
+                getBeanClass().getName());
     }
 
     /**
@@ -149,7 +149,7 @@ public class ProducerMethodBean<T> exten
                               " with passivating scope @%s" +
                               " must be Serializable";
         getWebBeansContext().getWebBeansUtil().checkSerializableScopeType(getScope(),
-                ClassUtil.isClassAssignable(Serializable.class, getReturnType()), errorMessage,
creatorMethod.getName(), ownerComponent.getReturnType().getName(),
+                ClassUtil.isClassAssignable(Serializable.class, getReturnType()), errorMessage,
creatorMethod.getName(), getBeanClass().getName(),
                 getScope().getName());
 
     }

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/third/ThirdpartyBeanImpl.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/third/ThirdpartyBeanImpl.java?rev=1476331&r1=1476330&r2=1476331&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/third/ThirdpartyBeanImpl.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/third/ThirdpartyBeanImpl.java
Fri Apr 26 18:28:00 2013
@@ -42,7 +42,8 @@ public class ThirdpartyBeanImpl<T> exten
         super(webBeansContext,
               WebBeansType.THIRDPARTY,
               new BeanAttributesImpl<T>(bean),
-              bean.getBeanClass());
+              bean.getBeanClass(),
+              bean.isNullable());
         
         this.bean = bean;
         

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=1476331&r1=1476330&r2=1476331&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
Fri Apr 26 18:28:00 2013
@@ -765,7 +765,7 @@ public final class WebBeansUtil
                     if (bean instanceof ProducerMethodBean)
                     {
                         ProducerMethodBean<?> producerBean = (ProducerMethodBean<?>)bean;
-                        if (producerBean.getParent() == superBean && producerBean.getProducer()
instanceof ProducerMethodProducer)
+                        if (producerBean.getBeanClass() == superBean.getBeanClass() &&
producerBean.getProducer() instanceof ProducerMethodProducer)
                         {
                             ProducerMethodProducer<?, ?> producer = (ProducerMethodProducer<?,
?>) producerBean.getProducer();
                             producer.specializeBy((Bean) comp);

Modified: openwebbeans/trunk/webbeans-jms/src/main/java/org/apache/webbeans/jms/component/JmsBean.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-jms/src/main/java/org/apache/webbeans/jms/component/JmsBean.java?rev=1476331&r1=1476330&r2=1476331&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-jms/src/main/java/org/apache/webbeans/jms/component/JmsBean.java
(original)
+++ openwebbeans/trunk/webbeans-jms/src/main/java/org/apache/webbeans/jms/component/JmsBean.java
Fri Apr 26 18:28:00 2013
@@ -22,9 +22,9 @@ import javax.enterprise.inject.spi.Produ
 import javax.jms.Destination;
 
 import org.apache.webbeans.component.AbstractOwbBean;
-import org.apache.webbeans.component.BeanAttributesImpl;
 import org.apache.webbeans.component.JmsBeanMarker;
 import org.apache.webbeans.component.WebBeansType;
+import org.apache.webbeans.component.spi.BeanAttributes;
 import org.apache.webbeans.config.WebBeansContext;
 import org.apache.webbeans.jms.JMSModel;
 
@@ -32,9 +32,9 @@ public class JmsBean<T> extends Abstract
 {
     private JMSModel jmsModel = null;
     
-    JmsBean(WebBeansContext webBeansContext, JMSModel jmsModel, BeanAttributesImpl<T>
beanAttributes)
+    JmsBean(WebBeansContext webBeansContext, JMSModel jmsModel, BeanAttributes<T> beanAttributes)
     {
-        super(webBeansContext, WebBeansType.JMS, beanAttributes, Destination.class);
+        super(webBeansContext, WebBeansType.JMS, beanAttributes, Destination.class, false);
         this.jmsModel = jmsModel;
     }
         



Mime
View raw message