openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rmannibu...@apache.org
Subject svn commit: r1647675 - in /openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans: config/WebBeansContext.java util/SpecializationUtil.java
Date Tue, 23 Dec 2014 21:09:21 GMT
Author: rmannibucau
Date: Tue Dec 23 21:09:21 2014
New Revision: 1647675

URL: http://svn.apache.org/r1647675
Log:
introducing findMissingAnnotatedType in WebBeansContext, surely something to rewrite but AnnotatedElementFactory
caches are clean up when the container is started and then no way to check if the AT is in
an upper BM. This is mainly an API for hierarchical BM ATM

Modified:
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/WebBeansContext.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/SpecializationUtil.java

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/WebBeansContext.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/WebBeansContext.java?rev=1647675&r1=1647674&r2=1647675&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/WebBeansContext.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/WebBeansContext.java
Tue Dec 23 21:09:21 2014
@@ -453,4 +453,9 @@ public class WebBeansContext
     {
         return applicationBoundaryService;
     }
+
+    public boolean findMissingAnnotatedType(final Class<?> missing)
+    {
+        return false; // used in hierarchical WBC
+    }
 }

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/SpecializationUtil.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/SpecializationUtil.java?rev=1647675&r1=1647674&r2=1647675&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/SpecializationUtil.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/SpecializationUtil.java
Tue Dec 23 21:09:21 2014
@@ -49,10 +49,11 @@ public class SpecializationUtil
 {
     private final AlternativesManager alternativesManager;
     private final WebBeansUtil webBeansUtil;
-
+    private final WebBeansContext webBeansContext;
 
     public SpecializationUtil(WebBeansContext webBeansContext)
     {
+        this.webBeansContext = webBeansContext;
         this.alternativesManager = webBeansContext.getAlternativesManager();
         this.webBeansUtil = webBeansContext.getWebBeansUtil();
     }
@@ -118,7 +119,7 @@ public class SpecializationUtil
                             continue;
                         }
 
-                        if (superType == null || !webBeansUtil.isConstructorOk(superType))
+                        if ((superType == null && !webBeansContext.findMissingAnnotatedType(superClass))
|| (superType != null && !webBeansUtil.isConstructorOk(superType)))
                         {
                             throw new WebBeansDeploymentException(new InconsistentSpecializationException("@Specializes
class " + specialClass.getName()
                                     + " does not extend a bean with a valid bean constructor"));



Mime
View raw message