cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject [2/2] cxf git commit: Better reporting of failing algorithm suite name
Date Mon, 26 Sep 2016 11:36:16 GMT
Better reporting of failing algorithm suite name


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

Branch: refs/heads/master
Commit: a910ac0abe58796e26c370ee9ba0f244482efb64
Parents: 0f74af5
Author: Colm O hEigeartaigh <coheigea@apache.org>
Authored: Mon Sep 26 12:35:06 2016 +0100
Committer: Colm O hEigeartaigh <coheigea@apache.org>
Committed: Mon Sep 26 12:35:52 2016 +0100

----------------------------------------------------------------------
 .../cxf/ws/security/policy/custom/AlgorithmSuiteBuilder.java | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/a910ac0a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/custom/AlgorithmSuiteBuilder.java
----------------------------------------------------------------------
diff --git a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/custom/AlgorithmSuiteBuilder.java
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/custom/AlgorithmSuiteBuilder.java
index d5ce360..0c7038d 100644
--- a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/custom/AlgorithmSuiteBuilder.java
+++ b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/custom/AlgorithmSuiteBuilder.java
@@ -58,7 +58,13 @@ public class AlgorithmSuiteBuilder implements AssertionBuilder<Element>
{
         }
         AlgorithmSuite algorithmSuite = loader.getAlgorithmSuite(bus, spVersion, nestedPolicy);
         if (algorithmSuite == null || algorithmSuite.getAlgorithmSuiteType() == null) {
-            String algorithmSuiteName = DOMUtils.getFirstElement(nestedPolicyElement).getLocalName();
+            String algorithmSuiteName = null;
+            if (algorithmSuite != null) {
+                algorithmSuiteName = algorithmSuite.getFirstInvalidAlgorithmSuite();
+            }
+            if (algorithmSuiteName == null) {
+                algorithmSuiteName = DOMUtils.getFirstElement(nestedPolicyElement).getLocalName();
+            }
             throw new IllegalArgumentException(
                 "Algorithm suite \"" + algorithmSuiteName + "\" is not registered"
             );


Mime
View raw message