[java-opensaml] branch maint-3.4 updated: OSJ-282: SignatureValidator initialization concurrency issue
Brent Putman
putmanb at georgetown.edu
Fri Sep 13 17:26:59 EDT 2019
This is an automated email from the git hooks/post-receive script.
putmanb pushed a commit to branch maint-3.4
in repository java-opensaml.
View the commit online:
http://git.shibboleth.net/view/?p=java-opensaml.git;a=commit;h=5e1a8bb75896a686ca61e69d8380ba0bc3015967
The following commit(s) were added to refs/heads/maint-3.4 by this push:
new 5e1a8bb OSJ-282: SignatureValidator initialization concurrency issue
5e1a8bb is described below
commit 5e1a8bb75896a686ca61e69d8380ba0bc3015967
Author: Brent Putman <putmanb at georgetown.edu>
AuthorDate: Fri Sep 13 17:25:23 2019 -0400
OSJ-282: SignatureValidator initialization concurrency issue
---
.../org/opensaml/xmlsec/signature/support/SignatureValidator.java | 4 +++-
.../src/main/java/org/opensaml/xmlsec/signature/support/Signer.java | 2 +-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/opensaml-xmlsec-api/src/main/java/org/opensaml/xmlsec/signature/support/SignatureValidator.java b/opensaml-xmlsec-api/src/main/java/org/opensaml/xmlsec/signature/support/SignatureValidator.java
index 1004ad8..8994bd2 100644
--- a/opensaml-xmlsec-api/src/main/java/org/opensaml/xmlsec/signature/support/SignatureValidator.java
+++ b/opensaml-xmlsec-api/src/main/java/org/opensaml/xmlsec/signature/support/SignatureValidator.java
@@ -60,7 +60,9 @@ public final class SignatureValidator {
* @return the SignatureValidationProvider
* @throws SignatureException if a SignatureValidationProvider could not be loaded
*/
- @Nonnull private static SignatureValidationProvider getSignatureValidationProvider() throws SignatureException {
+ @Nonnull private static synchronized SignatureValidationProvider getSignatureValidationProvider()
+ throws SignatureException {
+
if (validatorInstance == null) {
final ServiceLoader<SignatureValidationProvider> loader =
ServiceLoader.load(SignatureValidationProvider.class);
diff --git a/opensaml-xmlsec-api/src/main/java/org/opensaml/xmlsec/signature/support/Signer.java b/opensaml-xmlsec-api/src/main/java/org/opensaml/xmlsec/signature/support/Signer.java
index 6710fa5..e09ef81 100644
--- a/opensaml-xmlsec-api/src/main/java/org/opensaml/xmlsec/signature/support/Signer.java
+++ b/opensaml-xmlsec-api/src/main/java/org/opensaml/xmlsec/signature/support/Signer.java
@@ -79,7 +79,7 @@ public final class Signer {
* @return the SignerProvider
* @throws SignatureException if a SignerProvider could not be loaded
*/
- @Nonnull private static SignerProvider getSignerProvider() throws SignatureException {
+ @Nonnull private static synchronized SignerProvider getSignerProvider() throws SignatureException {
if (signerInstance == null) {
final ServiceLoader<SignerProvider> loader = ServiceLoader.load(SignerProvider.class);
final Iterator<SignerProvider> iterator = loader.iterator();
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list