openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject svn commit: r1429499 - in /openwebbeans/trunk/webbeans-impl/src: main/java/org/apache/webbeans/component/creation/ main/java/org/apache/webbeans/config/ test/java/org/apache/webbeans/test/
Date Sun, 06 Jan 2013 11:49:19 GMT
Author: arne
Date: Sun Jan  6 11:49:19 2013
New Revision: 1429499

URL: http://svn.apache.org/viewvc?rev=1429499&view=rev
Log:
OWB-745: moved DefinitionUtil.defineSerializable to AbstractBeanCreator

Modified:
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/creation/AbstractBeanCreator.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/creation/AbstractInjecionTargetBeanCreator.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/DefinitionUtil.java
    openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/TestContext.java

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/creation/AbstractBeanCreator.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/creation/AbstractBeanCreator.java?rev=1429499&r1=1429498&r2=1429499&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/creation/AbstractBeanCreator.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/creation/AbstractBeanCreator.java
Sun Jan  6 11:49:19 2013
@@ -18,6 +18,7 @@
  */
 package org.apache.webbeans.component.creation;
 
+import java.io.Serializable;
 import java.lang.annotation.Annotation;
 import java.lang.reflect.Method;
 import java.lang.reflect.Type;
@@ -47,6 +48,8 @@ import org.apache.webbeans.config.inheri
 import org.apache.webbeans.container.ExternalScope;
 import org.apache.webbeans.exception.WebBeansConfigurationException;
 import org.apache.webbeans.util.AnnotationUtil;
+import org.apache.webbeans.util.Asserts;
+import org.apache.webbeans.util.ClassUtil;
 
 /**
  * Abstract implementation.
@@ -402,7 +405,11 @@ public class AbstractBeanCreator<T> impl
      */
     public void defineSerializable()
     {
-        definitionUtil.defineSerializable(bean);
+        Asserts.assertNotNull(getBean(), "component parameter can not be null");
+        if (ClassUtil.isClassAssignable(Serializable.class, getBean().getReturnType()))
+        {
+            getBean().setSerializable(true);
+        }
     }
 
     /**

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/creation/AbstractInjecionTargetBeanCreator.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/creation/AbstractInjecionTargetBeanCreator.java?rev=1429499&r1=1429498&r2=1429499&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/creation/AbstractInjecionTargetBeanCreator.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/creation/AbstractInjecionTargetBeanCreator.java
Sun Jan  6 11:49:19 2013
@@ -392,7 +392,7 @@ public abstract class AbstractInjecionTa
                         producerFieldBean.setNullable(false);
                     }                    
 
-                    definitionUtil.defineSerializable(producerFieldBean);
+                    producerFieldBeanCreator.defineSerializable();
                     producerFieldBeanCreator.defineStereoTypes();
                     webBeansContext.getWebBeansUtil().setBeanEnableFlagForProducerBean(getBean(),
producerFieldBean, anns);
                     if (producerFieldBean.getReturnType().isArray())
@@ -459,7 +459,7 @@ public abstract class AbstractInjecionTa
                     producerMethodBean.setNullable(false);
                 }
                 
-                definitionUtil.defineSerializable(producerMethodBean);
+                producerMethodBeanCreator.defineSerializable();
                 producerMethodBeanCreator.defineStereoTypes();
                 webBeansContext.getWebBeansUtil().setBeanEnableFlagForProducerBean(getBean(),
                                                                                    producerMethodBean,

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/DefinitionUtil.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/DefinitionUtil.java?rev=1429499&r1=1429498&r2=1429499&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/DefinitionUtil.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/DefinitionUtil.java
Sun Jan  6 11:49:19 2013
@@ -18,7 +18,6 @@
  */
 package org.apache.webbeans.config;
 
-import java.io.Serializable;
 import java.lang.annotation.Annotation;
 import java.lang.reflect.Constructor;
 import java.util.ArrayList;
@@ -37,7 +36,6 @@ import org.apache.webbeans.exception.Web
 import org.apache.webbeans.intercept.InterceptorData;
 import org.apache.webbeans.spi.plugins.OpenWebBeansEjbPlugin;
 import org.apache.webbeans.util.Asserts;
-import org.apache.webbeans.util.ClassUtil;
 import org.apache.webbeans.util.WebBeansUtil;
 
 /**
@@ -158,15 +156,6 @@ public final class DefinitionUtil
         WebBeansDecoratorConfig.configureDecorators(bean);
     }
 
-    public <T> void defineSerializable(AbstractOwbBean<T> component)
-    {
-        Asserts.assertNotNull(component, "component parameter can not be null");
-        if (ClassUtil.isClassAssignable(Serializable.class, component.getReturnType()))
-        {
-            component.setSerializable(true);
-        }
-    }
-
     public <T> void addConstructorInjectionPointMetaData(AbstractOwbBean<T> owner,
Constructor<T> constructor)
     {
         List<InjectionPoint> injectionPoints = owner.getWebBeansContext().getInjectionPointFactory().getConstructorInjectionPointData(owner,
constructor);

Modified: openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/TestContext.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/TestContext.java?rev=1429499&r1=1429498&r2=1429499&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/TestContext.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/TestContext.java
Sun Jan  6 11:49:19 2013
@@ -531,7 +531,7 @@ public abstract class TestContext implem
 
         webBeansContext.getWebBeansUtil().setInjectionTargetBeanEnableFlag(component);
 
-        definitionUtil.defineSerializable(component);
+        managedBeanCreator.defineSerializable();
         managedBeanCreator.defineStereoTypes();
 
         Annotation[] clazzAnns = clazz.getDeclaredAnnotations();



Mime
View raw message