You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openwebbeans.apache.org by st...@apache.org on 2023/01/26 22:04:41 UTC

[openwebbeans] branch main updated (edcd0d3b3 -> 6a98ed1bf)

This is an automated email from the ASF dual-hosted git repository.

struberg pushed a change to branch main
in repository https://gitbox.apache.org/repos/asf/openwebbeans.git


    from edcd0d3b3 OWB-1417 improve Alternative Sterotype handling
     new 53ce5aa68 OWB-1417 implement ObserverMethod#getDeclaringBean
     new 4e3ef0419 OWB-1417 disable more invalid TCK tests
     new 6a98ed1bf OWB-1417 another illegal test with unspecified invocation order

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../org/apache/webbeans/config/BeansDeployer.java  |  2 +-
 .../apache/webbeans/event/OwbObserverMethod.java   |  7 +++++++
 webbeans-tck/standalone-suite.xml                  | 23 +++++++++++++++++++++-
 webbeans-tck/testng-dev.xml                        |  2 +-
 4 files changed, 31 insertions(+), 3 deletions(-)


[openwebbeans] 01/03: OWB-1417 implement ObserverMethod#getDeclaringBean

Posted by st...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

struberg pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/openwebbeans.git

commit 53ce5aa68ffa568a1df527a79845aeea2aea6fc1
Author: Mark Struberg <st...@apache.org>
AuthorDate: Thu Jan 26 22:10:09 2023 +0100

    OWB-1417 implement ObserverMethod#getDeclaringBean
---
 .../src/main/java/org/apache/webbeans/event/OwbObserverMethod.java | 7 +++++++
 webbeans-tck/testng-dev.xml                                        | 2 +-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/webbeans-impl/src/main/java/org/apache/webbeans/event/OwbObserverMethod.java b/webbeans-impl/src/main/java/org/apache/webbeans/event/OwbObserverMethod.java
index 7cf17d469..3b6016db0 100644
--- a/webbeans-impl/src/main/java/org/apache/webbeans/event/OwbObserverMethod.java
+++ b/webbeans-impl/src/main/java/org/apache/webbeans/event/OwbObserverMethod.java
@@ -20,6 +20,7 @@ package org.apache.webbeans.event;
 
 import java.util.Set;
 
+import jakarta.enterprise.inject.spi.Bean;
 import jakarta.enterprise.inject.spi.InjectionPoint;
 import jakarta.enterprise.inject.spi.ObserverMethod;
 
@@ -36,4 +37,10 @@ public interface OwbObserverMethod<T> extends ObserverMethod<T>
      * Returns the {@link InjectionPoint}s for the parameters of this observer method.
      */
     Set<InjectionPoint> getInjectionPoints();
+
+    @Override
+    default Bean<?> getDeclaringBean()
+    {
+        return getOwnerBean();
+    }
 }
diff --git a/webbeans-tck/testng-dev.xml b/webbeans-tck/testng-dev.xml
index 4b4aa1ef5..66ad653b4 100644
--- a/webbeans-tck/testng-dev.xml
+++ b/webbeans-tck/testng-dev.xml
@@ -19,7 +19,7 @@
     <test name="JSR-346 TCK">
 
         <classes>
-            <class name="org.jboss.cdi.tck.tests.definition.stereotype.priority.inherited.StereotypeInheritedPriorityTest" >
+            <class name="org.jboss.cdi.tck.tests.event.observer.method.ObserverMethodTest" >
                 <methods>
                     <include name=".*"/>
                 </methods>


[openwebbeans] 02/03: OWB-1417 disable more invalid TCK tests

Posted by st...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

struberg pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/openwebbeans.git

commit 4e3ef0419043dd6f58898e99abff556ba7f9dfb7
Author: Mark Struberg <st...@apache.org>
AuthorDate: Thu Jan 26 22:57:57 2023 +0100

    OWB-1417 disable more invalid TCK tests
---
 .../java/org/apache/webbeans/config/BeansDeployer.java |  2 +-
 webbeans-tck/standalone-suite.xml                      | 18 +++++++++++++++++-
 webbeans-tck/testng-dev.xml                            |  2 +-
 3 files changed, 19 insertions(+), 3 deletions(-)

diff --git a/webbeans-impl/src/main/java/org/apache/webbeans/config/BeansDeployer.java b/webbeans-impl/src/main/java/org/apache/webbeans/config/BeansDeployer.java
index 32cbaf146..99e0e8371 100644
--- a/webbeans-impl/src/main/java/org/apache/webbeans/config/BeansDeployer.java
+++ b/webbeans-impl/src/main/java/org/apache/webbeans/config/BeansDeployer.java
@@ -2105,7 +2105,7 @@ public class BeansDeployer
 
                 Set<ObserverMethod<?>> observerMethods;
                 AnnotatedType<T> beanAnnotatedType = bean.getAnnotatedType();
-                if(bean.isEnabled())
+                if (bean.isEnabled())
                 {
                     observerMethods = new ObserverMethodsBuilder<>(webBeansContext, beanAnnotatedType).defineObserverMethods(bean, false);
                 }
diff --git a/webbeans-tck/standalone-suite.xml b/webbeans-tck/standalone-suite.xml
index 5492700ac..7704c7450 100644
--- a/webbeans-tck/standalone-suite.xml
+++ b/webbeans-tck/standalone-suite.xml
@@ -65,6 +65,8 @@
             <!--
                 Test wrongly assumes a specific ordering although both interceptors have priority 2000 and thus
                 might get invoked in unspecified order.
+                The Interceptors Spec explicitly says:
+                "If more than one interceptor has the same priority, the relative order of those interceptors is undefined."
             -->
             <class name="org.jboss.cdi.tck.interceptors.tests.bindings.aroundConstruct.ConstructorInterceptionTest" >
                 <methods>
@@ -77,6 +79,11 @@
                     <exclude name="testResolveInterceptorsReturnsOrderedList"/>
                 </methods>
             </class>
+            <class name="org.jboss.cdi.tck.interceptors.tests.bindings.overriding.InterceptorBindingOverridingTest" >
+                <methods>
+                    <exclude name="testInterceptorBindingOverriden"/>
+                </methods>
+            </class>
 
             <!--
                 This is just the most backward breaking change I've seen in years.
@@ -107,7 +114,7 @@
             </class>
 
             <!--
-                Illegal code as they do call reateInjectionTarget(null); and not on the real bean.
+                Illegal code as they do call createInjectionTarget(null); and not on the real bean.
             -->
             <class name="org.jboss.cdi.tck.tests.full.extensions.alternative.metadata.interceptor.AlternativeMetadataInterceptorInjectionTargetTest" >
                 <methods>
@@ -124,6 +131,15 @@
                 </methods>
             </class>
 
+            <!--
+                Test assumes wrong Exception. An AssertERROR gets thrown, but they catch an Exception...
+            -->
+            <class name="org.jboss.cdi.tck.interceptors.tests.contract.aroundConstruct.bindings.AroundConstructTest" >
+                <methods>
+                    <exclude name="testExceptions"/>
+                </methods>
+            </class>
+
 
 
             <!-- Tests broken in the CDI-2.0 TCK: -->
diff --git a/webbeans-tck/testng-dev.xml b/webbeans-tck/testng-dev.xml
index 66ad653b4..c448d2342 100644
--- a/webbeans-tck/testng-dev.xml
+++ b/webbeans-tck/testng-dev.xml
@@ -19,7 +19,7 @@
     <test name="JSR-346 TCK">
 
         <classes>
-            <class name="org.jboss.cdi.tck.tests.event.observer.method.ObserverMethodTest" >
+            <class name="org.jboss.cdi.tck.interceptors.tests.contract.aroundConstruct.bindings.AroundConstructTest" >
                 <methods>
                     <include name=".*"/>
                 </methods>


[openwebbeans] 03/03: OWB-1417 another illegal test with unspecified invocation order

Posted by st...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

struberg pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/openwebbeans.git

commit 6a98ed1bf60fc4bd3432d83d87702dbab748c157
Author: Mark Struberg <st...@apache.org>
AuthorDate: Thu Jan 26 23:03:49 2023 +0100

    OWB-1417 another illegal test with unspecified invocation order
---
 webbeans-tck/standalone-suite.xml | 5 +++++
 webbeans-tck/testng-dev.xml       | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/webbeans-tck/standalone-suite.xml b/webbeans-tck/standalone-suite.xml
index 7704c7450..fcaa02f3c 100644
--- a/webbeans-tck/standalone-suite.xml
+++ b/webbeans-tck/standalone-suite.xml
@@ -84,6 +84,11 @@
                     <exclude name="testInterceptorBindingOverriden"/>
                 </methods>
             </class>
+            <class name="org.jboss.cdi.tck.interceptors.tests.contract.lifecycleCallback.bindings.LifecycleInterceptorDefinitionTest" >
+                <methods>
+                    <exclude name="testMultipleLifecycleInterceptors"/>
+                </methods>
+            </class>
 
             <!--
                 This is just the most backward breaking change I've seen in years.
diff --git a/webbeans-tck/testng-dev.xml b/webbeans-tck/testng-dev.xml
index c448d2342..e63273b2f 100644
--- a/webbeans-tck/testng-dev.xml
+++ b/webbeans-tck/testng-dev.xml
@@ -19,7 +19,7 @@
     <test name="JSR-346 TCK">
 
         <classes>
-            <class name="org.jboss.cdi.tck.interceptors.tests.contract.aroundConstruct.bindings.AroundConstructTest" >
+            <class name="org.jboss.cdi.tck.interceptors.tests.contract.lifecycleCallback.bindings.LifecycleInterceptorDefinitionTest" >
                 <methods>
                     <include name=".*"/>
                 </methods>