[java-opensaml] 19/24: OSJ-219: AbstractReloadingMetadataResolver refresh() should check if resolver is destroyed
Brent Putman
putmanb at georgetown.edu
Wed Sep 27 16:46:13 EDT 2017
This is an automated email from the git hooks/post-receive script.
putmanb pushed a commit to branch maint-3.3
in repository java-opensaml.
View the commit online:
http://git.shibboleth.net/view/?p=java-opensaml.git;a=commit;h=37886cb555d94433308cd886f928c09066c5d88b
commit 37886cb555d94433308cd886f928c09066c5d88b
Author: Brent Putman <putmanb at georgetown.edu>
AuthorDate: Fri Sep 15 18:03:30 2017 -0400
OSJ-219: AbstractReloadingMetadataResolver refresh() should check if
resolver is destroyed
---
.../metadata/resolver/impl/AbstractReloadingMetadataResolver.java | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/opensaml-saml-impl/src/main/java/org/opensaml/saml/metadata/resolver/impl/AbstractReloadingMetadataResolver.java b/opensaml-saml-impl/src/main/java/org/opensaml/saml/metadata/resolver/impl/AbstractReloadingMetadataResolver.java
index 6c47004..8c482ef 100644
--- a/opensaml-saml-impl/src/main/java/org/opensaml/saml/metadata/resolver/impl/AbstractReloadingMetadataResolver.java
+++ b/opensaml-saml-impl/src/main/java/org/opensaml/saml/metadata/resolver/impl/AbstractReloadingMetadataResolver.java
@@ -281,6 +281,11 @@ public abstract class AbstractReloadingMetadataResolver extends AbstractBatchMet
String mdId = null;
try {
+ // In case a destroy() thread beat this thread into the monitor.
+ if (isDestroyed()) {
+ return;
+ }
+
// A manual refresh() must cancel the previously-scheduled future task, since will (re)schedule its own.
// If this execution *is* the task, it's ok to cancel ourself, we're already running.
if (refreshMetadataTask != null) {
@@ -554,7 +559,7 @@ public abstract class AbstractReloadingMetadataResolver extends AbstractBatchMet
//CheckStyle: ReturnCount OFF
@Override public void run() {
try {
- if (!isInitialized()) {
+ if (isDestroyed()) {
// just in case the metadata provider was destroyed before this task runs
return;
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list