cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1005223 - in /cxf/trunk/rt/ws/policy/src: main/java/org/apache/cxf/ws/policy/ test/java/org/apache/cxf/ws/policy/
Date Wed, 06 Oct 2010 20:05:24 GMT
Author: dkulp
Date: Wed Oct  6 20:05:24 2010
New Revision: 1005223

URL: http://svn.apache.org/viewvc?rev=1005223&view=rev
Log:
[CXF-3037] Make sure registry gets sent into normalize methods

Modified:
    cxf/trunk/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/EffectivePolicyImpl.java
    cxf/trunk/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/EndpointPolicyImpl.java
    cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/EffectivePolicyImplTest.java
    cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/EndpointPolicyImplTest.java

Modified: cxf/trunk/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/EffectivePolicyImpl.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/EffectivePolicyImpl.java?rev=1005223&r1=1005222&r2=1005223&view=diff
==============================================================================
--- cxf/trunk/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/EffectivePolicyImpl.java
(original)
+++ cxf/trunk/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/EffectivePolicyImpl.java
Wed Oct  6 20:05:24 2010
@@ -131,7 +131,7 @@ public class EffectivePolicyImpl impleme
         if (null != bmi) {
             policy = policy.merge(engine.getAggregatedMessagePolicy(bmi));
         }
-        policy = (Policy)policy.normalize(true);
+        policy = (Policy)policy.normalize(engine.getRegistry(), true);
         return assertor;
     }
     
@@ -140,7 +140,7 @@ public class EffectivePolicyImpl impleme
         policy = engine.getServerEndpointPolicy(ei, (Destination)null).getPolicy();     
   
         policy = policy.merge(engine.getAggregatedOperationPolicy(boi));
         policy = policy.merge(engine.getAggregatedFaultPolicy(bfi));
-        policy = (Policy)policy.normalize(true);
+        policy = (Policy)policy.normalize(engine.getRegistry(), true);
     }
 
     void chooseAlternative(PolicyEngineImpl engine, Assertor assertor) {

Modified: cxf/trunk/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/EndpointPolicyImpl.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/EndpointPolicyImpl.java?rev=1005223&r1=1005222&r2=1005223&view=diff
==============================================================================
--- cxf/trunk/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/EndpointPolicyImpl.java
(original)
+++ cxf/trunk/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/EndpointPolicyImpl.java
Wed Oct  6 20:05:24 2010
@@ -90,7 +90,8 @@ public class EndpointPolicyImpl implemen
         EndpointPolicyImpl epi = createEndpointPolicy();
         
         if (!PolicyUtils.isEmptyPolicy(p)) {
-            Policy normalizedPolicy = (Policy)p.normalize(true);
+            Policy normalizedPolicy 
+                = (Policy)p.normalize(engine == null ? null : engine.getRegistry(), true);
             epi.setPolicy(getPolicy().merge(normalizedPolicy));
         } else {
             Policy clonedPolicy = new Policy();
@@ -149,7 +150,8 @@ public class EndpointPolicyImpl implemen
         policy = engine.getAggregatedServicePolicy(ei.getService());
         policy = policy.merge(engine.getAggregatedEndpointPolicy(ei));
         if (!policy.isEmpty()) {
-            policy = (Policy)policy.normalize(true);
+            policy = (Policy)policy.normalize(engine == null ? null : engine.getRegistry(),
+                                              true);
         }
     }
 

Modified: cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/EffectivePolicyImplTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/EffectivePolicyImplTest.java?rev=1005223&r1=1005222&r2=1005223&view=diff
==============================================================================
--- cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/EffectivePolicyImplTest.java
(original)
+++ cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/EffectivePolicyImplTest.java
Wed Oct  6 20:05:24 2010
@@ -200,7 +200,7 @@ public class EffectivePolicyImplTest ext
         Policy mp = control.createMock(Policy.class);
         EasyMock.expect(engine.getAggregatedMessagePolicy(bmi)).andReturn(mp);
         EasyMock.expect(merged.merge(mp)).andReturn(merged);
-        EasyMock.expect(merged.normalize(true)).andReturn(merged);
+        EasyMock.expect(merged.normalize(null, true)).andReturn(merged);
         
         control.replay();
         EffectivePolicyImpl epi = new EffectivePolicyImpl();
@@ -228,7 +228,7 @@ public class EffectivePolicyImplTest ext
         Policy fp = control.createMock(Policy.class);
         EasyMock.expect(engine.getAggregatedFaultPolicy(bfi)).andReturn(fp);
         EasyMock.expect(merged.merge(fp)).andReturn(merged);
-        EasyMock.expect(merged.normalize(true)).andReturn(merged);
+        EasyMock.expect(merged.normalize(null, true)).andReturn(merged);
         
         control.replay();
         EffectivePolicyImpl epi = new EffectivePolicyImpl();

Modified: cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/EndpointPolicyImplTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/EndpointPolicyImplTest.java?rev=1005223&r1=1005222&r2=1005223&view=diff
==============================================================================
--- cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/EndpointPolicyImplTest.java
(original)
+++ cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/EndpointPolicyImplTest.java
Wed Oct  6 20:05:24 2010
@@ -142,7 +142,7 @@ public class EndpointPolicyImplTest exte
         EasyMock.expect(engine.getAggregatedEndpointPolicy(ei)).andReturn(ep);
         Policy merged = control.createMock(Policy.class);
         EasyMock.expect(sp.merge(ep)).andReturn(merged);
-        EasyMock.expect(merged.normalize(true)).andReturn(merged);
+        EasyMock.expect(merged.normalize(null, true)).andReturn(merged);
         
         control.replay();
         EndpointPolicyImpl epi = new EndpointPolicyImpl(ei, engine, true, null);
@@ -200,7 +200,7 @@ public class EndpointPolicyImplTest exte
         p2.addAssertion(mockAssertion(aqn2, 5, true));
         control.replay();
         
-        epi.setPolicy((Policy)p1.normalize(true));
+        epi.setPolicy((Policy)p1.normalize(null, true));
                 
         Policy ep = epi.updatePolicy(p2).getPolicy();
         



Mime
View raw message