cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject [1/2] cxf git commit: Better reporting of failing algorithm suite name
Date Mon, 26 Sep 2016 11:39:07 GMT
Repository: cxf
Updated Branches:
  refs/heads/3.1.x-fixes e982c5518 -> 4d849ec58


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/34fc2964
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/34fc2964
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/34fc2964

Branch: refs/heads/3.1.x-fixes
Commit: 34fc296433c50a3db7c522a3d723a6cef9c86266
Parents: e982c55
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:37:03 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/34fc2964/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