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 08B1611F05 for ; Thu, 5 Jun 2014 11:03:02 +0000 (UTC) Received: (qmail 66668 invoked by uid 500); 5 Jun 2014 11:03:01 -0000 Delivered-To: apmail-cxf-issues-archive@cxf.apache.org Received: (qmail 66631 invoked by uid 500); 5 Jun 2014 11:03:01 -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 66621 invoked by uid 99); 5 Jun 2014 11:03:01 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 05 Jun 2014 11:03:01 +0000 Date: Thu, 5 Jun 2014 11:03:01 +0000 (UTC) From: "MIchail Nikolaev (JIRA)" To: issues@cxf.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CXF-5776) @PathParam not works inside @BeanParam 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-5776?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14018676#comment-14018676 ] MIchail Nikolaev commented on CXF-5776: --------------------------------------- https://github.com/apache/cxf/pull/7 > @PathParam not works inside @BeanParam > -------------------------------------- > > Key: CXF-5776 > URL: https://issues.apache.org/jira/browse/CXF-5776 > Project: CXF > Issue Type: Bug > Components: JAX-RS > Affects Versions: 2.7.11 > Reporter: MIchail Nikolaev > Assignee: Sergey Beryozkin > Priority: Minor > > Check line: > https://fisheye6.atlassian.com/browse/~br=2.7.x-fixes/cxf/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/client/ClientProxyImpl.java?r=3248da800fdf25f5bd962b962b7ff2d9d98cd225#to485 > Error in the snippet > {code} > m.getParameterAnnotations()[0] > {code} > - for some reason you get first annotation from *parameter* of the method (setter?). > So, to make it worked I need to use such workaround: > {code} > @PathParam("identity") > public void setIdentity(@Nonnull @PathParam("identity") Identity identity) { > this.identity = identity; > } > {code} > Probably you need to call _getter.getAnnotation(anClass)_ to allow such properties to work (it worked in 2.7.9 as far as I remember): > {code} > public void setIdentity(@Nonnull Identity identity) { > this.identity = identity; > } > @PathParam("identity") > @Nonnull > public Identity getIdentity() { > return identity; > } > {code} > Also, it is better to catch Exception instead of Throwable. -- This message was sent by Atlassian JIRA (v6.2#6252)