You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by as...@apache.org on 2014/02/21 16:07:18 UTC

[1/2] git commit: Improved fix of [CXF-5571], enabled broken test

Repository: cxf
Updated Branches:
  refs/heads/master 642f2534d -> bb3073ce8


Improved fix of [CXF-5571], enabled broken test


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

Branch: refs/heads/master
Commit: 94a152462a823b5dd0b4e193c5f4698f018dc237
Parents: 0bbd3da
Author: Andrei Shakirin <an...@gmail.com>
Authored: Fri Feb 21 16:06:15 2014 +0100
Committer: Andrei Shakirin <an...@gmail.com>
Committed: Fri Feb 21 16:06:15 2014 +0100

----------------------------------------------------------------------
 .../policy/selector/BaseAlternativeSelector.java  | 18 ++++++++++++++++--
 .../systest/ws/algsuite/AlgorithmSuiteTest.java   |  2 --
 2 files changed, 16 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/94a15246/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/selector/BaseAlternativeSelector.java
----------------------------------------------------------------------
diff --git a/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/selector/BaseAlternativeSelector.java b/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/selector/BaseAlternativeSelector.java
index 40e51a0..ed88265 100644
--- a/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/selector/BaseAlternativeSelector.java
+++ b/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/selector/BaseAlternativeSelector.java
@@ -27,6 +27,7 @@ import javax.xml.namespace.QName;
 
 import org.apache.cxf.ws.policy.AlternativeSelector;
 import org.apache.neethi.Assertion;
+import org.apache.neethi.builders.PrimitiveAssertion;
 
 
 /**
@@ -48,13 +49,26 @@ public abstract class BaseAlternativeSelector implements AlternativeSelector {
     }
 
     protected boolean isCompatible(List<Assertion> alternative, List<Assertion> r) {
-        // Workaround until Neethi assertions do not override equals()
         List<QName> rNames = new ArrayList<QName>(r.size());
         for (Assertion ra : r) {
             rNames.add(ra.getName());
         }
+        
         for (Assertion a : alternative) {
-            rNames.remove(a.getName());
+            for (Assertion ra : r) {
+                if (a.equals(ra)) {
+                    rNames.remove(ra.getName());
+                    break;
+                } else {
+                    // Workaround until Neethi assertions implementations do not override equals(): 
+                    // objects in lists can be different instances
+                    if ((a instanceof PrimitiveAssertion) && (ra instanceof PrimitiveAssertion) 
+                        && ((PrimitiveAssertion) a).equal(ra)) {
+                        rNames.remove(ra.getName());
+                        break;
+                    }
+                }
+            }
         }
         return rNames.isEmpty();
     }

http://git-wip-us.apache.org/repos/asf/cxf/blob/94a15246/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/algsuite/AlgorithmSuiteTest.java
----------------------------------------------------------------------
diff --git a/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/algsuite/AlgorithmSuiteTest.java b/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/algsuite/AlgorithmSuiteTest.java
index 76ba4d6..2796af4 100644
--- a/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/algsuite/AlgorithmSuiteTest.java
+++ b/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/algsuite/AlgorithmSuiteTest.java
@@ -137,9 +137,7 @@ public class AlgorithmSuiteTest extends AbstractBusClientServerTestBase {
         bus.shutdown(true);
     }
     
-    // TODO @Ignore'ing this test due to a recent merge from Andrei
     @org.junit.Test
-    @org.junit.Ignore
     public void testCombinedPolicy() throws Exception {
         
         if (!SecurityTestUtil.checkUnrestrictedPoliciesInstalled()) {


[2/2] git commit: Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/cxf

Posted by as...@apache.org.
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/cxf


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

Branch: refs/heads/master
Commit: bb3073ce8a040956c3c18a050604e6cd19c0d35a
Parents: 94a1524 642f253
Author: Andrei Shakirin <an...@gmail.com>
Authored: Fri Feb 21 16:06:38 2014 +0100
Committer: Andrei Shakirin <an...@gmail.com>
Committed: Fri Feb 21 16:06:38 2014 +0100

----------------------------------------------------------------------
 .../cxf/ws/security/trust/AbstractSTSClient.java   | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)
----------------------------------------------------------------------