openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gerdo...@apache.org
Subject svn commit: r907505 - in /openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans: component/creation/ config/ decorator/ util/
Date Sun, 07 Feb 2010 22:24:05 GMT
Author: gerdogdu
Date: Sun Feb  7 22:24:04 2010
New Revision: 907505

URL: http://svn.apache.org/viewvc?rev=907505&view=rev
Log:
Update while running TCK

Modified:
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/creation/AnnotatedTypeBeanCreatorImpl.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/creation/ManagedBeanCreatorImpl.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/BeansDeployer.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/DefinitionUtil.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/decorator/WebBeansDecorator.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/WebBeansAnnotatedTypeUtil.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/AnnotatedTypeBeanCreatorImpl.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/creation/AnnotatedTypeBeanCreatorImpl.java?rev=907505&r1=907504&r2=907505&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/creation/AnnotatedTypeBeanCreatorImpl.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/creation/AnnotatedTypeBeanCreatorImpl.java
Sun Feb  7 22:24:04 2010
@@ -39,6 +39,8 @@
     {
         WebBeansAnnotatedTypeUtil.checkManagedBeanCondition(getAnnotatedType());
         WebBeansUtil.checkGenericType(getBean());
+        //Check Unproxiable
+        WebBeansUtil.checkUnproxiableApiType(getBean(), getBean().getScope());          
         
     }
     
     

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/creation/ManagedBeanCreatorImpl.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/creation/ManagedBeanCreatorImpl.java?rev=907505&r1=907504&r2=907505&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/creation/ManagedBeanCreatorImpl.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/creation/ManagedBeanCreatorImpl.java
Sun Feb  7 22:24:04 2010
@@ -54,7 +54,8 @@
     {
         ManagedBeanConfigurator.checkManagedBeanCondition(getBean().getReturnType());
         WebBeansUtil.checkGenericType(getBean());
-        
+        //Check Unproxiable
+        WebBeansUtil.checkUnproxiableApiType(getBean(), getBean().getScope());          
         
     }
 
 

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/BeansDeployer.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/BeansDeployer.java?rev=907505&r1=907504&r2=907505&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/BeansDeployer.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/BeansDeployer.java
Sun Feb  7 22:24:04 2010
@@ -661,15 +661,13 @@
 
             //Define meta-data
             managedBeanCreator.defineStereoTypes();
-
             //Scope type
-            managedBeanCreator.defineScopeType(logger.getTokenString(OWBLogConst.TEXT_MB_IMPL)
+ clazz.getName() + logger.getTokenString(OWBLogConst.TEXT_SAME_SCOPE));
-            managedBeanCreator.checkCreateConditions();
-                                    
+            managedBeanCreator.defineScopeType(logger.getTokenString(OWBLogConst.TEXT_MB_IMPL)
+ clazz.getName() + logger.getTokenString(OWBLogConst.TEXT_SAME_SCOPE));                 
                                          
             //Check for Enabled via Alternative
             WebBeansUtil.setBeanEnableFlag(managedBean);
             
-            managedBeanCreator.defineApiType();
+            managedBeanCreator.defineApiType();                        
+            managedBeanCreator.checkCreateConditions();
             managedBeanCreator.defineQualifier();
             managedBeanCreator.defineName(WebBeansUtil.getManagedBeanDefaultName(clazz.getSimpleName()));
             managedBeanCreator.defineConstructor();            

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=907505&r1=907504&r2=907505&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 Feb  7 22:24:04 2010
@@ -659,6 +659,7 @@
 
         DefinitionUtil.defineProducerMethodApiTypes(component, method.getGenericReturnType(),
methodAnns);
         DefinitionUtil.defineScopeType(component, methodAnns, "WebBeans producer method :
" + method.getName() + " in class " + parent.getReturnType().getName() + " must declare default
@Scope annotation");
+        WebBeansUtil.checkUnproxiableApiType(component, component.getScope());
         WebBeansUtil.checkProducerGenericType(component,method);        
         DefinitionUtil.defineQualifiers(component, methodAnns);
         DefinitionUtil.defineName(component, methodAnns, WebBeansUtil.getProducerDefaultName(method.getName()));
@@ -707,6 +708,7 @@
 
         DefinitionUtil.defineProducerMethodApiTypes(component, field.getGenericType(), fieldAnns);
         DefinitionUtil.defineScopeType(component, fieldAnns, "WebBeans producer method :
" + field.getName() + " in class " + parent.getReturnType().getName() + " must declare default
@Scope annotation");
+        WebBeansUtil.checkUnproxiableApiType(component, component.getScope());
         WebBeansUtil.checkProducerGenericType(component,field);
         DefinitionUtil.defineQualifiers(component, fieldAnns);
         DefinitionUtil.defineName(component, fieldAnns, field.getName());

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/decorator/WebBeansDecorator.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/decorator/WebBeansDecorator.java?rev=907505&r1=907504&r2=907505&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/decorator/WebBeansDecorator.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/decorator/WebBeansDecorator.java
Sun Feb  7 22:24:04 2010
@@ -197,13 +197,20 @@
      */
     private boolean apiTypesMatchDelegateType(Set<Type> apiTypes)
     {
+        boolean ok = false;
         for (Type apiType : apiTypes)
         {
             if (ClassUtil.isAssignable(apiType, this.delegateType))
             {
-                return true;
+                ok = true;
+                break;
             }
         }
+        
+        if(ok) 
+        {
+            return true;
+        }
 
         return false;
     }

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/WebBeansAnnotatedTypeUtil.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/WebBeansAnnotatedTypeUtil.java?rev=907505&r1=907504&r2=907505&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/WebBeansAnnotatedTypeUtil.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/WebBeansAnnotatedTypeUtil.java
Sun Feb  7 22:24:04 2010
@@ -433,6 +433,7 @@
                     Set<Type> types = annotatedField.getTypeClosure();
                     producerFieldBean.getTypes().addAll(types);
                     DefinitionUtil.defineScopeType(producerFieldBean, anns, "Annotated producer
field: " + annotatedField +  "must declare default @Scope annotation");
+                    WebBeansUtil.checkUnproxiableApiType(producerFieldBean, producerFieldBean.getScope());
                     WebBeansUtil.checkProducerGenericType(producerFieldBean,annotatedField.getJavaMember());
       
                     DefinitionUtil.defineQualifiers(producerFieldBean, anns);
                     DefinitionUtil.defineName(producerFieldBean, anns, WebBeansUtil.getProducerDefaultName(annotatedField.getJavaMember().getName()));
@@ -488,6 +489,7 @@
                 Set<Type> types = annotatedMethod.getTypeClosure();
                 producerMethodBean.getTypes().addAll(types);
                 DefinitionUtil.defineScopeType(producerMethodBean, AnnotationUtil.getAnnotationsFromSet(annotatedMethod.getAnnotations()),
"Annotated producer method : " + annotatedMethod +  "must declare default @Scope annotation");
+                WebBeansUtil.checkUnproxiableApiType(producerMethodBean, producerMethodBean.getScope());
                 WebBeansUtil.checkProducerGenericType(producerMethodBean,annotatedMethod.getJavaMember());
       
                 DefinitionUtil.defineQualifiers(producerMethodBean, AnnotationUtil.getAnnotationsFromSet(annotatedMethod.getAnnotations()));
                 DefinitionUtil.defineName(producerMethodBean, AnnotationUtil.getAnnotationsFromSet(annotatedMethod.getAnnotations()),
WebBeansUtil.getProducerDefaultName(annotatedMethod.getJavaMember().getName()));
@@ -744,13 +746,11 @@
         managedBeanCreator.defineStereoTypes();
 
         //Scope type
-        managedBeanCreator.defineScopeType(logger.getTokenString(OWBLogConst.TEXT_MB_IMPL)
+ clazz.getName() + logger.getTokenString(OWBLogConst.TEXT_SAME_SCOPE));
-        managedBeanCreator.checkCreateConditions();
-                                
+        managedBeanCreator.defineScopeType(logger.getTokenString(OWBLogConst.TEXT_MB_IMPL)
+ clazz.getName() + logger.getTokenString(OWBLogConst.TEXT_SAME_SCOPE));                 
                      
         //Check for Enabled via Alternative
-        WebBeansUtil.setBeanEnableFlag(managedBean);
-        
+        WebBeansUtil.setBeanEnableFlag(managedBean);        
         managedBeanCreator.defineApiType();
+        managedBeanCreator.checkCreateConditions();
         managedBeanCreator.defineQualifier();
         managedBeanCreator.defineName(WebBeansUtil.getManagedBeanDefaultName(clazz.getSimpleName()));
         managedBeanCreator.defineConstructor();            

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=907505&r1=907504&r2=907505&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
Sun Feb  7 22:24:04 2010
@@ -1484,7 +1484,7 @@
 
             }
         }
-
+        
         if (superClass != null && !superClass.equals(Object.class))
         {
             Constructor<?> cons = ClassUtil.isContaintNoArgConstructor(superClass);



Mime
View raw message