Skip to content

Commit

Permalink
WELD-2756 Add deprecation note to docs and tests, update deps
Browse files Browse the repository at this point in the history
  • Loading branch information
manovotn committed Oct 25, 2023
1 parent 44c5c66 commit 3cf0aea
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
3 changes: 3 additions & 0 deletions docs/reference/src/main/asciidoc/interceptors.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -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<T> annotationType)`.
You shouldn't need this in most cases, but it comes handy when working with `@Nonbinding` values in interceptor binding annotations.

Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
<arquillian.jetty.version>1.0.0.Final</arquillian.jetty.version>
<atinject.tck.version>2.0.1</atinject.tck.version>
<!-- Version of the CDI 4.x release TCK -->
<cdi.tck-4-0.version>4.1.0-SNAPSHOT</cdi.tck-4-0.version>
<cdi.tck-4-0.version>4.0.10</cdi.tck-4-0.version>
<!-- By default, each mvn profile uses corresponding file from TCK repo, see jboss-tck-runner/pom.xml -->
<!-- We can also use our own file, needed for relaxed mode testing (see WeldMethodInterceptor) -->
<!-- Our variant is under src/test/tck/tck-tests.xml -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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}
* <p/>
* See https://issues.redhat.com/browse/WELD-2756
*/
@RunWith(Arquillian.class)
public class InvocationContextInterceptorBindingsTest {

Expand Down

0 comments on commit 3cf0aea

Please sign in to comment.