@andymc12 Thanks a lot for addressing this very edgy case. I was looking how 
the current implementation works and basically I was trying to understand if we 
could defer the evaluation of the HTTP parameters (like `@FormParam`) to a 
later phase. In general, I think it would be feasible but would significantly 
impact the existing design.

However, I think I found a simple trick to make it work: reordering parameters 
initialization. Here is an interesting exercise:

- `Response processForm(@FormParam("value") String value, Form form)` -> does 
not work
- `Response processForm(Form form, @FormParam("value") String value)` -> works 
just fine

So the idea in the nutshell is to a modify `JAXRSUtils::processParameters` to 
initialize parameters in a different order. In this case, the `Form` should be 
initialized before any `@FormParam`, it triggers the reader interceptors and 
the right values are propagated in `Form` and `@FromParam` arguments. It should 
also work in case of constructors or class members.

What do you think? 
Thanks!

[ Full content available at: https://github.com/apache/cxf/pull/453 ]
This message was relayed via gitbox.apache.org for devnull@infra.apache.org

Reply via email to