You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Jim Ma (JIRA)" <ji...@apache.org> on 2013/01/18 08:16:13 UTC

[jira] [Commented] (CXF-4735) @XmlJavaTypeAdapter ignored on exception setters

    [ https://issues.apache.org/jira/browse/CXF-4735?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13557011#comment-13557011 ] 

Jim Ma commented on CXF-4735:
-----------------------------

Patch applied. Two lines are added to fix the test case failure : 


    private static boolean isGetter(Method m) {
        if (m.getReturnType() != Void.class && m.getReturnType() != Void.TYPE && m.getParameterTypes().length == 0) {
            Method setter = getSetter(m);
            if (setter != null) {
                return !setter.isAnnotationPresent(XmlTransient.class);
            }
 +           return true;
        }
        return false;
    }


    static XmlJavaTypeAdapter getMethodXJTA(final Method m) {
        XmlJavaTypeAdapter adapter = m.getAnnotation(XmlJavaTypeAdapter.class);
        if (adapter == null) {
            Method setter = getSetter(m);
+           if (setter != null) {
                adapter = setter.getAnnotation(XmlJavaTypeAdapter.class);
            }
        }





                
> @XmlJavaTypeAdapter ignored on exception setters
> ------------------------------------------------
>
>                 Key: CXF-4735
>                 URL: https://issues.apache.org/jira/browse/CXF-4735
>             Project: CXF
>          Issue Type: Bug
>          Components: JAXB Databinding
>            Reporter: Richard Opalka
>            Assignee: Jim Ma
>             Fix For: 2.5.9, 2.6.6, 2.7.3
>
>         Attachments: CXF4735.patch
>
>
> It works on getters but can be specified on setters as well (see JAXB spec.)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira