cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From iris ding <irisdin...@gmail.com>
Subject @context injection through setter method - method name restriction
Date Tue, 22 Jul 2014 06:26:27 GMT
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.

Mime
View raw message