eclipse-ee4j / krazo

Apache License 2.0
50 stars 19 forks source link

Fix annotation check for controller methods in RESTEasy #346

Closed erdlet closed 1 year ago

erdlet commented 1 year ago

While fixing #334 (PR #335) we introduced a small bug during the check if a method needs to be processed by the general validator or not. Because of this bug, the implementation checked only if a method is annotated with @Controller, but not if this is the case for the whole class. The result was Krazo not handling invalid input correctly.

This fix adds the ability to check if the method OR the declaring class is annotated with @Controller, so we ensure we really have something that needs to be handled by MVC.

This fix needs to be backported to Krazo 3.0.x.

fixes: #342

erdlet commented 1 year ago

Assuming lazy acknowledgment because of missing response.