[ https://issues.apache.org/jira/browse/CXF-5897?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14074238#comment-14074238 ]
iris ding commented on CXF-5897: -------------------------------- According the discussion from http://cxf.547215.n5.nabble.com/context-injection-through-setter-method-method-name-restriction-td5746712.html, Let's relax the method name restriction and add a check for the parameterType as Interface (Yes, 1. can be implemented as part the JIRA you created (the proxy won't be created for non interfaces either way but no point in even trying to do it). ) like below: private void checkContextMethod(Method m, Object provider) { Class<?> type = m.getParameterTypes()[0]; //if (m.getName().equals("set" + type.getSimpleName())) { if (m.getName().startsWith("set") && ((type.isInterface() || type == Application.class))) { addContextMethod(type, m, provider); } } Iris Ding > Relax setter method name restriction for @context injection > ----------------------------------------------------------- > > Key: CXF-5897 > URL: https://issues.apache.org/jira/browse/CXF-5897 > Project: CXF > Issue Type: Bug > Reporter: iris ding > Assignee: Andrei Shakirin > Fix For: 3.0.2 > > > Relax setter method name restriction for @context injection -- This message was sent by Atlassian JIRA (v6.2#6252)