Return-Path: X-Original-To: apmail-cxf-issues-archive@www.apache.org Delivered-To: apmail-cxf-issues-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8D4E8DA6F for ; Tue, 19 Jun 2012 14:29:44 +0000 (UTC) Received: (qmail 40250 invoked by uid 500); 19 Jun 2012 14:29:43 -0000 Delivered-To: apmail-cxf-issues-archive@cxf.apache.org Received: (qmail 40185 invoked by uid 500); 19 Jun 2012 14:29:43 -0000 Mailing-List: contact issues-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list issues@cxf.apache.org Received: (qmail 39777 invoked by uid 99); 19 Jun 2012 14:29:43 -0000 Received: from issues-vm.apache.org (HELO issues-vm) (140.211.11.160) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 19 Jun 2012 14:29:43 +0000 Received: from isssues-vm.apache.org (localhost [127.0.0.1]) by issues-vm (Postfix) with ESMTP id 816A814002F for ; Tue, 19 Jun 2012 14:29:43 +0000 (UTC) Date: Tue, 19 Jun 2012 14:29:43 +0000 (UTC) From: "Marko Voss (JIRA)" To: issues@cxf.apache.org Message-ID: <1240494656.29866.1340116183532.JavaMail.jiratomcat@issues-vm> In-Reply-To: <1855226305.15922.1339686163749.JavaMail.jiratomcat@issues-vm> Subject: [jira] [Commented] (CXF-4380) JAXBElementProvider is calling wrong method for classes extending JAXBElement MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CXF-4380?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13396803#comment-13396803 ] Marko Voss commented on CXF-4380: --------------------------------- Thank you! :) > JAXBElementProvider is calling wrong method for classes extending JAXBElement > ----------------------------------------------------------------------------- > > Key: CXF-4380 > URL: https://issues.apache.org/jira/browse/CXF-4380 > Project: CXF > Issue Type: Bug > Components: JAX-RS > Affects Versions: 2.6.1 > Reporter: Marko Voss > Assignee: Sergey Beryozkin > Fix For: 2.4.9, 2.5.5, 2.6.2, 2.7.0 > > Attachments: FilterTypeTO.java, ObjectFactory.java, ParamTypeTO.java, RevokeGrantsTaskParamTO.java, package-info.java > > > JAXBElementProvider line 170 - 176: > This piece of code performs a special handling for classes, which extends JAXBElement but it calls the wrong unmarshal method. > Unmarshaller.unmarshal(Source source, Class declaredType) > Unmarshaller.unmarshal(XMLStreamReader reader, Class declaredType) > Unmarshaller.unmarshal(XMLEventReader reader, Class declaredType) > Unmarshaller.unmarshal(Node node, Class declaredType) > These methods are not able to deal with classes, which extend JAXBElement, because they explicitly check, if the declaredType is part of the known classes of the JAXBContext. This is not the case. > Please use the other methods instead. > Suggested solution: Change > {code} > response = unmarshaller.unmarshal(TransformUtils.createNewReaderIfNeeded(reader, is), theType); > {code} > to > {code} > response = unmarshaller.unmarshal(TransformUtils.createNewReaderIfNeeded(reader, is)); > {code} -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira