You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by co...@apache.org on 2019/12/12 13:48:58 UTC
[camel] branch camel-2.x updated: Fixing failing xml security tests
with latest Azul JDK
This is an automated email from the ASF dual-hosted git repository.
coheigea pushed a commit to branch camel-2.x
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/camel-2.x by this push:
new 3882c8d Fixing failing xml security tests with latest Azul JDK
3882c8d is described below
commit 3882c8dfda7fbd1d6a037cebe64a1f4791d3e283
Author: Colm O hEigeartaigh <co...@apache.org>
AuthorDate: Thu Dec 12 13:40:05 2019 +0000
Fixing failing xml security tests with latest Azul JDK
---
.../apache/camel/component/xmlsecurity/processor/SantuarioUtil.java | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/components/camel-xmlsecurity/src/main/java/org/apache/camel/component/xmlsecurity/processor/SantuarioUtil.java b/components/camel-xmlsecurity/src/main/java/org/apache/camel/component/xmlsecurity/processor/SantuarioUtil.java
index b37e3ee..8043471 100644
--- a/components/camel-xmlsecurity/src/main/java/org/apache/camel/component/xmlsecurity/processor/SantuarioUtil.java
+++ b/components/camel-xmlsecurity/src/main/java/org/apache/camel/component/xmlsecurity/processor/SantuarioUtil.java
@@ -72,9 +72,10 @@ public final class SantuarioUtil {
public Boolean run() {
String providerName = "ApacheXMLDSig";
Provider currentProvider = Security.getProvider(providerName);
- if (currentProvider == null) {
- Security.addProvider(new XMLDSigRI());
+ if (currentProvider != null) {
+ Security.removeProvider(currentProvider.getName());
}
+ Security.addProvider(new XMLDSigRI());
return true;
}
});