cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject [08/21] git commit: Moxy doesn't set the "type" properly, do an instanceof
Date Wed, 02 Apr 2014 06:26:04 GMT
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 <dkulp@apache.org>
Authored: Thu Mar 27 01:13:07 2014 -0400
Committer: Daniel Kulp <dkulp@apache.org>
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);


Mime
View raw message