Skip to content

Commit b36fcea

Browse files
committed
fix InterceptorDefinitionTest.testInterceptorsImplementInterceptorInterface
This test uses an internal `ParameterizedTypeImpl` class, which isn't guaranteed to be present in the set of interface types implemented by an interceptor metadata class. The JDK implementation of `ParameterizedType` may be present as well. This commit uses the public interface `ParameterizedType` to perform this test.
1 parent dc6a835 commit b36fcea

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

impl/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/InterceptorDefinitionTest.java

+2-3
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,7 @@
3434
import org.jboss.cdi.tck.AbstractTest;
3535
import org.jboss.cdi.tck.shrinkwrap.WebArchiveBuilder;
3636
import org.jboss.cdi.tck.util.HierarchyDiscovery;
37-
import org.jboss.cdi.tck.util.ParameterizedTypeImpl;
3837
import org.jboss.shrinkwrap.api.spec.WebArchive;
39-
import org.jboss.shrinkwrap.impl.BeansXml;
4038
import org.jboss.test.audit.annotations.SpecAssertion;
4139
import org.jboss.test.audit.annotations.SpecAssertions;
4240
import org.jboss.test.audit.annotations.SpecVersion;
@@ -45,6 +43,7 @@
4543
import java.lang.annotation.Annotation;
4644
import java.lang.annotation.ElementType;
4745
import java.lang.annotation.Target;
46+
import java.lang.reflect.ParameterizedType;
4847
import java.lang.reflect.Type;
4948
import java.util.ArrayList;
5049
import java.util.Arrays;
@@ -90,7 +89,7 @@ public static WebArchive createTestArchive() {
9089
public void testInterceptorsImplementInterceptorInterface() {
9190
boolean interfaceFound = false;
9291
for (Type type : getInterfacesImplemented(getTransactionalInterceptor().getClass())) {
93-
if (type instanceof ParameterizedTypeImpl && ((ParameterizedTypeImpl) type).getRawType().equals(Interceptor.class)) {
92+
if (type instanceof ParameterizedType && ((ParameterizedType) type).getRawType().equals(Interceptor.class)) {
9493
interfaceFound = true;
9594
break;
9695
}

0 commit comments

Comments
 (0)