In RESTEasy 2.3.2 the @Context annotation can be used to inject the context variables declared in the super class of a resource implementation. However, in RESTEasy 3.0.1 this functionality no longer works.
In the following example the super class declares a context variable:
In the subclass the context variable is used in a method:
With RESTEasy 2.3.2 the method works just fine, but with RESTEasy 3.0.1 it now throws a null pointer exception since the context variable is never initialized.
It looks like RESTEasy 3.0.1 will only iterate through the fields
declared explicitly in the resource implementation, so the context variable in the super class is not registered for injection:
There is another ticket describing a similar issue:
but that ticket was filed for version 1.1 GA and it's still open.
The current issue seems to be different because it used to work in version 2.3.2.