-
Enhancement
-
Resolution: Unresolved
-
Minor
-
None
-
None
When defining an Interceptor like this:
public class MyInterceptor { @PostConstruct public Object wrapC(InvocationContext ctx) throws Exception { { // ... return ctx.proceed(); // throws Exception }
Then I get this warning by Weld:
WARN: WELD-001471: Interceptor method wrapC defined on class com.MyInterceptor is not defined according to the specification. It should not throw java.lang.Exception, which is a checked exception.
However, the javadoc of javax.annotation.PostConstruct says:
The method defined on an interceptor class MUST HAVE one of the following signatures: void <METHOD>(InvocationContext) Object <METHOD>(InvocationContext) throws Exception
http://docs.oracle.com/javaee/7/api/javax/annotation/PostConstruct.html
It would be nice if the warning would allow Exception for the signature with the Exception
- is related to
-
WELD-1401 Make it possible to distinguish an interceptor class bound using @Interceptors from a CDI managed bean
- Resolved