-
Bug
-
Resolution: Done
-
Major
-
2.2.2.GA
-
None
In situations like this:
interface SuperInt { @Path("foo") @GET @Produces("application/json") String getFoo(); } abstract class SuperIntAbstract implements SuperInt { @Override public String getFoo() { return "Foo: " + getName(); } protected abstract String getName(); } @Path("/somewhere") class SomeOtherResource { @Path("superint") public SuperInt getSuperInt() { return new SuperIntAbstract() { @Override protected String getName() { return "Fred"; } }; } }
When a client accesses GET /somewhere/superint/foo, resteasy throws indicating that it doesn't think the returned type from getSuperInt() has JAX-RS annotations. In GetRestful.getSubResourceClass(), resteasy looks first up the superclass chain for JAX-RS annotations, then it looks only at the immediate class's interfaces and throws if they don't have JAX-RS annos.
Is it possible that resteasy should examine superclass interfaces as well? What is the purpose of finding a single class with some jaxrs annotations? What if the class (or a superclass) implemented several interfaces that had different, but compatible annotations?