cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject git commit: [CXF-5664] - Also check a JAXBElement for a primary participant
Date Tue, 22 Apr 2014 16:47:39 GMT
Repository: cxf
Updated Branches:
  refs/heads/master cf6342212 -> 2625deedb


[CXF-5664] - Also check a JAXBElement for a primary participant


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/2625deed
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/2625deed
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/2625deed

Branch: refs/heads/master
Commit: 2625deedb3de474576638ddb1d283fbf2ade2e2b
Parents: cf63422
Author: Colm O hEigeartaigh <coheigea@apache.org>
Authored: Tue Apr 22 17:47:19 2014 +0100
Committer: Colm O hEigeartaigh <coheigea@apache.org>
Committed: Tue Apr 22 17:47:19 2014 +0100

----------------------------------------------------------------------
 .../token/provider/DefaultConditionsProvider.java | 18 ++++++++----------
 1 file changed, 8 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/2625deed/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/provider/DefaultConditionsProvider.java
----------------------------------------------------------------------
diff --git a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/provider/DefaultConditionsProvider.java
b/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/provider/DefaultConditionsProvider.java
index 625fc68..7d1d6ac 100644
--- a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/provider/DefaultConditionsProvider.java
+++ b/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/provider/DefaultConditionsProvider.java
@@ -232,20 +232,18 @@ public class DefaultConditionsProvider implements ConditionsProvider
{
         
         Participants participants = providerParameters.getTokenRequirements().getParticipants();
         if (participants != null) {
-            if (participants.getPrimaryParticipant() instanceof Element) {
-                String address = 
-                    extractAddressFromParticipantsEPR((Element)participants.getPrimaryParticipant());
-                if (address != null) {
-                    AudienceRestrictionBean audienceRestriction = new AudienceRestrictionBean();
-                    audienceRestriction.setAudienceURIs(Collections.singletonList(address));
-                    audienceRestrictions.add(audienceRestriction);
-                }
+            String address = 
+                extractAddressFromParticipantsEPR(participants.getPrimaryParticipant());
+            if (address != null) {
+                AudienceRestrictionBean audienceRestriction = new AudienceRestrictionBean();
+                audienceRestriction.setAudienceURIs(Collections.singletonList(address));
+                audienceRestrictions.add(audienceRestriction);
             }
-            
+
             if (participants.getParticipants() != null) {
                 for (Object participant : participants.getParticipants()) {
                     if (participant != null) {
-                        String address = extractAddressFromParticipantsEPR(participant);
+                        address = extractAddressFromParticipantsEPR(participant);
                         if (address != null) {
                             AudienceRestrictionBean audienceRestriction = new AudienceRestrictionBean();
                             audienceRestriction.setAudienceURIs(Collections.singletonList(address));


Mime
View raw message