From 3cf0aea993ab5e6e1aea29d4a39dfac02083b99b Mon Sep 17 00:00:00 2001 From: Matej Novotny Date: Wed, 20 Sep 2023 16:51:34 +0200 Subject: [PATCH] WELD-2756 Add deprecation note to docs and tests, update deps --- docs/reference/src/main/asciidoc/interceptors.asciidoc | 3 +++ pom.xml | 2 +- .../bindings/InvocationContextInterceptorBindingsTest.java | 6 ++++++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/docs/reference/src/main/asciidoc/interceptors.asciidoc b/docs/reference/src/main/asciidoc/interceptors.asciidoc index 606c3ce2690..94c45a107a6 100644 --- a/docs/reference/src/main/asciidoc/interceptors.asciidoc +++ b/docs/reference/src/main/asciidoc/interceptors.asciidoc @@ -339,6 +339,9 @@ Therefore, we recommend the use of CDI-style interceptor bindings. === Enhanced version of `jakarta.interceptor.InvocationContext` For even more control over interceptors, Weld offers enhanced version of `jakarta.interceptor.InvocationContext` - `org.jboss.weld.interceptor.WeldInvocationContext`. + +NOTE: *The functionality described below is deprecated since Weld 6 and will be removed in the future. Users should instead use newly added methods directly from `jakarta.interceptor.InvocationContext`, hence removing the need to use Weld specific APIs for this purpose.* + It comes with two additional methods - `getInterceptorBindings` and `getInterceptorBindingsByType(Class annotationType)`. You shouldn't need this in most cases, but it comes handy when working with `@Nonbinding` values in interceptor binding annotations. diff --git a/pom.xml b/pom.xml index 7c6dbdf8e53..1f3bbaebee8 100644 --- a/pom.xml +++ b/pom.xml @@ -61,7 +61,7 @@ 1.0.0.Final 2.0.1 - 4.1.0-SNAPSHOT + 4.0.10 diff --git a/tests-arquillian/src/test/java/org/jboss/weld/tests/interceptors/context/bindings/InvocationContextInterceptorBindingsTest.java b/tests-arquillian/src/test/java/org/jboss/weld/tests/interceptors/context/bindings/InvocationContextInterceptorBindingsTest.java index 8b7dc5efa6f..c78fc2b398b 100644 --- a/tests-arquillian/src/test/java/org/jboss/weld/tests/interceptors/context/bindings/InvocationContextInterceptorBindingsTest.java +++ b/tests-arquillian/src/test/java/org/jboss/weld/tests/interceptors/context/bindings/InvocationContextInterceptorBindingsTest.java @@ -34,6 +34,12 @@ import org.junit.Test; import org.junit.runner.RunWith; +/** + * Tests now deprecated functionality, can be altered/removed once we no longer provide + * {@link org.jboss.weld.interceptor.WeldInvocationContext#INTERCEPTOR_BINDINGS_KEY} + *

+ * See https://issues.redhat.com/browse/WELD-2756 + */ @RunWith(Arquillian.class) public class InvocationContextInterceptorBindingsTest {