+1

Thanks, Sergey
On 22/07/14 11:40, Andrei Shakirin wrote:
Hi Iris,

This restriction was already discussed in 
http://cxf.547215.n5.nabble.com/Getting-hold-of-JAX-RS-MessageContext-tt5745816.html
 .
Yes, it makes sense to relax / drop the restriction.

Could you please create an issue for this?

Regards,
Andrei.

-----Original Message-----
From: iris ding [mailto:[email protected]]
Sent: Dienstag, 22. Juli 2014 08:26
To: [email protected]
Subject: @context injection through setter method - method name restriction

I found out CXF has method name restriction for @context injection through
setter method:
private void checkContextMethod(Method m, Object provider) {
         Class<?> type = m.getParameterTypes()[0];
         if (m.getName().equals("set" + type.getSimpleName())) {
             addContextMethod(type, m, provider);
         }
     }

It is fine we enforces the method starts with 'set', but I do not think we 
should
enforce other naming check.  Instead, according to spec, we should add check
to enforce the Parameter type for the setter method  be one of
following:
     UriInfo
     HttpHeaders
     Request
     SecurityContext

What do you think about this problem?

Iris Ding





--
View this message in context: http://cxf.547215.n5.nabble.com/context-
injection-through-setter-method-method-name-restriction-tp5746712.html
Sent from the cxf-dev mailing list archive at Nabble.com.


Reply via email to