You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by co...@apache.org on 2012/10/05 17:58:35 UTC
svn commit: r1394613 -
/cxf/branches/2.6.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/PolicyBasedWSS4JInInterceptor.java
Author: coheigea
Date: Fri Oct 5 15:58:34 2012
New Revision: 1394613
URL: http://svn.apache.org/viewvc?rev=1394613&view=rev
Log:
Merged revisions 1394612 via git cherry-pick from
https://svn.apache.org/repos/asf/cxf/trunk
........
r1394612 | coheigea | 2012-10-05 16:57:35 +0100 (Fri, 05 Oct 2012) | 2 lines
Minor performance improvement when evaluating multiple XPaths
........
Modified:
cxf/branches/2.6.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/PolicyBasedWSS4JInInterceptor.java
Modified: cxf/branches/2.6.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/PolicyBasedWSS4JInInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.6.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/PolicyBasedWSS4JInInterceptor.java?rev=1394613&r1=1394612&r2=1394613&view=diff
==============================================================================
--- cxf/branches/2.6.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/PolicyBasedWSS4JInInterceptor.java (original)
+++ cxf/branches/2.6.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/PolicyBasedWSS4JInInterceptor.java Fri Oct 5 15:58:34 2012
@@ -23,6 +23,7 @@ import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
import java.util.ArrayList;
+import java.util.Arrays;
import java.util.Collection;
import java.util.HashSet;
import java.util.List;
@@ -408,15 +409,14 @@ public class PolicyBasedWSS4JInIntercept
}
if (xpaths != null) {
- for (String xPath : xpaths) {
- try {
- CryptoCoverageUtil.checkCoverage(soapEnvelope, refs,
- namespaces, xPath, type, scope);
- } catch (WSSecurityException e) {
- ai.setNotAsserted("No " + type
- + " element found matching XPath " + xPath);
- return false;
- }
+ try {
+ CryptoCoverageUtil.checkCoverage(soapEnvelope, refs,
+ namespaces, xpaths, type, scope);
+ } catch (WSSecurityException e) {
+ ai.setNotAsserted("No " + type
+ + " element found matching one of the XPaths "
+ + Arrays.toString(xpaths.toArray()));
+ return false;
}
}
}