cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andriy Redko (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (CXF-7229) ClassHelper usages not replacable by ClassUnwrapper
Date Fri, 27 Jan 2017 12:25:24 GMT

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

Andriy Redko edited comment on CXF-7229 at 1/27/17 12:24 PM:
-------------------------------------------------------------

Hey Sergey,

Sorry, the 'prototype' is not important here, but the test case fails right now because of
the instance of Book class serialization. The message body writer (Jackson) returns JSON-serialized
proxy class instance (the JUnit assert shows that) instead of Book instance.

{code:java}
org.junit.ComparisonFailure: expected:<{[ "title": "Sample Book"]}> but was:<{["title":"Sample
Book","frozen":false,"targetClass":"org.apache.cxf.systest.jaxrs.spring.Book","targetSource":{"target":{"title":"Sample
Book"},"static":true,"targetClass":"org.apache.cxf.systest.jaxrs.spring.Book"},"exposeProxy":true,"proxiedInterfaces":[],"proxyTargetClass":false,"preFiltered":false,"advisors":[]]}>
{code}

Another interesting edge case is usage of annotations: the Book instance is annotated using
@JsonIgnore for `id` field. However the test case does not progress to this point yet due
to improper serialization.

Thanks.

Best Regards,
    Andriy Redko


was (Author: reta):
Hey Sergey,

Sorry, the 'prototype' is not important here, but the test case fails right now because of
the instance of book class, the message body writer (Jackson) returns JSON-serialized proxy
class instance (the JUnit assert shows that).

{code:java}
org.junit.ComparisonFailure: expected:<{[ "title": "Sample Book"]}> but was:<{["title":"Sample
Book","frozen":false,"targetClass":"org.apache.cxf.systest.jaxrs.spring.Book","targetSource":{"target":{"title":"Sample
Book"},"static":true,"targetClass":"org.apache.cxf.systest.jaxrs.spring.Book"},"exposeProxy":true,"proxiedInterfaces":[],"proxyTargetClass":false,"preFiltered":false,"advisors":[]]}>
{code}

Another interesting edge case is usage of annotations: the Book instance is annotated using
@JsonIgnore for `id` field. However the test case does not progress to this point yet due
to improper serialization.

Thanks.

Best Regards,
    Andriy Redko

> ClassHelper usages not replacable by ClassUnwrapper
> ---------------------------------------------------
>
>                 Key: CXF-7229
>                 URL: https://issues.apache.org/jira/browse/CXF-7229
>             Project: CXF
>          Issue Type: Bug
>            Reporter: Romain Manni-Bucau
>            Assignee: Andriy Redko
>         Attachments: proxy-test-case.txt
>
>
> ClassUnwrapper and ClassHelper are pretty close and for an app setting a single one should
be enough (in particular cause ClassHelper overriding is hacky)
> Spotted org.apache.cxf.jaxrs.utils.InjectionUtils#getRawResponseClass for instance



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message