cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject [1/2] git commit: [CXF-5664] - Also check a JAXBElement for a primary participant
Date Tue, 22 Apr 2014 16:50:06 GMT
Repository: cxf
Updated Branches:
  refs/heads/2.7.x-fixes 16b7596d2 -> 4a92b5f2a


[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/d0f037fe
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/d0f037fe
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/d0f037fe

Branch: refs/heads/2.7.x-fixes
Commit: d0f037fe3c9a95d5b716bc9b89b0d4d25c9616a8
Parents: 16b7596
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:49:02 2014 +0100

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


http://git-wip-us.apache.org/repos/asf/cxf/blob/d0f037fe/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 a899af9..8164202 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
@@ -248,20 +248,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