[java-opensaml] branch master updated: OSJ-219: AbstractReloadingMetadataResolver refresh() should check if resolver is destroyed

Brent Putman putmanb at georgetown.edu
Fri Sep 15 18:03:58 EDT 2017


This is an automated email from the git hooks/post-receive script.

putmanb pushed a commit to branch master
in repository java-opensaml.

View the commit online:
http://git.shibboleth.net/view/?p=java-opensaml.git;a=commit;h=af9498db9c26bfe679c55b4bc0285e4727b7568d

The following commit(s) were added to refs/heads/master by this push:
       new  af9498d   OSJ-219: AbstractReloadingMetadataResolver refresh() should check if resolver is destroyed
af9498d is described below

commit af9498db9c26bfe679c55b4bc0285e4727b7568d
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 f935691..5d9beb8 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
@@ -333,6 +333,11 @@ public abstract class AbstractReloadingMetadataResolver extends AbstractBatchMet
         trackRefreshSuccess = false;
 
         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) {
@@ -647,7 +652,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