Author: coheigea Date: Fri Oct 5 16:02:00 2012 New Revision: 1394618 URL: http://svn.apache.org/viewvc?rev=1394618&view=rev Log: Merged revisions 1394615 via git cherry-pick from https://svn.apache.org/repos/asf/cxf/branches/2.5.x-fixes
........ r1394615 | coheigea | 2012-10-05 17:00:08 +0100 (Fri, 05 Oct 2012) | 18 lines Merged revisions 1394613 via git cherry-pick from https://svn.apache.org/repos/asf/cxf/branches/2.6.x-fixes ........ r1394613 | coheigea | 2012-10-05 16:58:34 +0100 (Fri, 05 Oct 2012) | 10 lines 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.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/PolicyBasedWSS4JInInterceptor.java Modified: cxf/branches/2.4.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.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/PolicyBasedWSS4JInInterceptor.java?rev=1394618&r1=1394617&r2=1394618&view=diff ============================================================================== --- cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/PolicyBasedWSS4JInInterceptor.java (original) +++ cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/PolicyBasedWSS4JInInterceptor.java Fri Oct 5 16:02:00 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; } } }
