Return-Path: X-Original-To: apmail-cxf-commits-archive@www.apache.org Delivered-To: apmail-cxf-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id EFE1111637 for ; Wed, 2 Apr 2014 06:27:02 +0000 (UTC) Received: (qmail 2527 invoked by uid 500); 2 Apr 2014 06:26:22 -0000 Delivered-To: apmail-cxf-commits-archive@cxf.apache.org Received: (qmail 1948 invoked by uid 500); 2 Apr 2014 06:26:04 -0000 Mailing-List: contact commits-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 commits@cxf.apache.org Received: (qmail 1669 invoked by uid 99); 2 Apr 2014 06:25:59 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Apr 2014 06:25:59 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 2DB4B925879; Wed, 2 Apr 2014 06:25:59 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: dkulp@apache.org To: commits@cxf.apache.org Date: Wed, 02 Apr 2014 06:26:04 -0000 Message-Id: In-Reply-To: <23d8af09f3434827801be041543dc389@git.apache.org> References: <23d8af09f3434827801be041543dc389@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [08/21] git commit: Moxy doesn't set the "type" properly, do an instanceof Moxy doesn't set the "type" properly, do an instanceof Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/f9119128 Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/f9119128 Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/f9119128 Branch: refs/heads/2.7.x-fixes Commit: f911912867faa606359e0fa6e55b9582d1c52cb7 Parents: 8772066 Author: Daniel Kulp Authored: Thu Mar 27 01:13:07 2014 -0400 Committer: Daniel Kulp Committed: Wed Apr 2 02:11:51 2014 -0400 ---------------------------------------------------------------------- .../main/java/org/apache/cxf/sts/request/RequestParser.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cxf/blob/f9119128/services/sts/sts-core/src/main/java/org/apache/cxf/sts/request/RequestParser.java ---------------------------------------------------------------------- diff --git a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/request/RequestParser.java b/services/sts/sts-core/src/main/java/org/apache/cxf/sts/request/RequestParser.java index c7917b4..ceeee13 100644 --- a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/request/RequestParser.java +++ b/services/sts/sts-core/src/main/java/org/apache/cxf/sts/request/RequestParser.java @@ -331,7 +331,8 @@ public class RequestParser { byte[] x509 = null; if (useKey.getAny() instanceof JAXBElement) { JAXBElement useKeyJaxb = (JAXBElement)useKey.getAny(); - if (KeyInfoType.class == useKeyJaxb.getDeclaredType()) { + Object obj = useKeyJaxb.getValue(); + if (KeyInfoType.class == useKeyJaxb.getDeclaredType() || obj instanceof KeyInfoType) { KeyInfoType keyInfoType = KeyInfoType.class.cast(useKeyJaxb.getValue()); LOG.fine("Found KeyInfo UseKey type"); for (Object keyInfoContent : keyInfoType.getContent()) { @@ -348,7 +349,8 @@ public class RequestParser { } } } - } else if (SecurityTokenReferenceType.class == useKeyJaxb.getDeclaredType()) { + } else if (SecurityTokenReferenceType.class == useKeyJaxb.getDeclaredType() + || obj instanceof SecurityTokenReferenceType) { SecurityTokenReferenceType strType = SecurityTokenReferenceType.class.cast(useKeyJaxb.getValue()); Element token = fetchTokenElementFromReference(strType, wsContext);