[java-opensaml] branch master updated: Move all possible code into try block of reloading resolver refresh().
Brent Putman
putmanb at georgetown.edu
Wed Aug 16 17:46:01 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=928a54547940f71e97f8d98c9fd42dbbebd4bf2b
The following commit(s) were added to refs/heads/master by this push:
new 928a545 Move all possible code into try block of reloading resolver refresh().
928a545 is described below
commit 928a54547940f71e97f8d98c9fd42dbbebd4bf2b
Author: Brent Putman <putmanb at georgetown.edu>
AuthorDate: Wed Aug 16 17:45:58 2017 -0400
Move all possible code into try block of reloading resolver refresh().
It's really, really extremely unlikely that new-ing a DateTime
or a logging call could throw, but let's be absolutely positively
on the safe side, since otherwise the consequences will be that the
next refresh will not be scheduled.
---
.../resolver/impl/AbstractReloadingMetadataResolver.java | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
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 54693d8..48881a7 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
@@ -327,12 +327,16 @@ public abstract class AbstractReloadingMetadataResolver extends AbstractBatchMet
*/
@Override
public synchronized void refresh() throws ResolverException {
- final DateTime now = new DateTime(ISOChronology.getInstanceUTC());
- final String mdId = getMetadataIdentifier();
+ DateTime now = null;
+ String mdId = null;
trackRefreshSuccess = false;
- log.debug("{} Beginning refresh of metadata from '{}'", getLogPrefix(), mdId);
try {
+ now = new DateTime(ISOChronology.getInstanceUTC());
+ mdId = getMetadataIdentifier();
+
+ log.debug("{} Beginning refresh of metadata from '{}'", getLogPrefix(), mdId);
+
final byte[] mdBytes = fetchMetadata();
if (mdBytes == null) {
log.info("{} Metadata from '{}' has not changed since last refresh", getLogPrefix(), mdId);
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list