Skip to content
This repository was archived by the owner on Jan 30, 2019. It is now read-only.
This repository was archived by the owner on Jan 30, 2019. It is now read-only.

Incompatible change regarding @Interceptor annotation #27

@glassfishrobot

Description

@glassfishrobot

The Interceptors 1.1 specification says:

The @interceptor annotation may be used to explicitly designate a class as an interceptor class. Support
for this annotation is not required.

which implies that an interceptor class (@interceptor class Foo), that is bound using the @interceptors(Foo.class) annotation may be annotated with the @interceptor annotation (with no interceptor bindings) to be explicitly designated as an interceptor class.

In addition, the JavaDoc for the Interceptor annotation (version 1.2) says:

This annotation is optional if the Interceptors annotation or the EJB deployment descriptor are used to associate the interceptor with the target class. It is required when an interceptor binding is used.

which is in line with the above.

However, the Interceptors 1.2 specification says:

All interceptors declared using the Interceptor annotation should specify at least one interceptor binding. If an interceptor declared using the Interceptor annotation does not declare any interceptor binding, non-portable behavior results.

Now, the interceptor (@interceptor class Foo) which does not specify any interceptor binding but uses the @interceptor annotation suddenly relies on non-portable behavior.

Affected Versions

[1.2]

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions