[java-opensaml] branch master updated: Small date/time cleanups.
Scott Cantor
cantor.2 at osu.edu
Thu Mar 21 12:11:16 EDT 2019
This is an automated email from the git hooks/post-receive script.
scantor 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=de56aa5d9f930d34f41d89a1036adf359fe39a0c
The following commit(s) were added to refs/heads/master by this push:
new de56aa5 Small date/time cleanups.
de56aa5 is described below
commit de56aa5d9f930d34f41d89a1036adf359fe39a0c
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Thu Mar 21 12:11:14 2019 -0400
Small date/time cleanups.
---
.../common/binding/artifact/impl/StorageServiceSAMLArtifactMap.java | 3 ++-
.../saml/saml2/assertion/impl/OneTimeUseConditionValidator.java | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/opensaml-saml-impl/src/main/java/org/opensaml/saml/common/binding/artifact/impl/StorageServiceSAMLArtifactMap.java b/opensaml-saml-impl/src/main/java/org/opensaml/saml/common/binding/artifact/impl/StorageServiceSAMLArtifactMap.java
index 979f461..38b0948 100644
--- a/opensaml-saml-impl/src/main/java/org/opensaml/saml/common/binding/artifact/impl/StorageServiceSAMLArtifactMap.java
+++ b/opensaml-saml-impl/src/main/java/org/opensaml/saml/common/binding/artifact/impl/StorageServiceSAMLArtifactMap.java
@@ -19,6 +19,7 @@ package org.opensaml.saml.common.binding.artifact.impl;
import java.io.IOException;
import java.time.Duration;
+import java.time.Instant;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
@@ -194,7 +195,7 @@ public class StorageServiceSAMLArtifactMap extends AbstractInitializableComponen
final boolean success =
getStorageService().create(STORAGE_CONTEXT, artifact, artifactEntry,
(StorageSerializer) getEntryFactory(),
- System.currentTimeMillis() + getArtifactLifetime().toMillis());
+ Instant.now().plus(getArtifactLifetime()).toEpochMilli());
if (!success) {
throw new IOException("A duplicate artifact was generated");
}
diff --git a/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/assertion/impl/OneTimeUseConditionValidator.java b/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/assertion/impl/OneTimeUseConditionValidator.java
index 7de042c..b04bfc3 100644
--- a/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/assertion/impl/OneTimeUseConditionValidator.java
+++ b/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/assertion/impl/OneTimeUseConditionValidator.java
@@ -139,7 +139,7 @@ public class OneTimeUseConditionValidator implements ConditionValidator {
* Get the one-time use expiration time for the assertion being evaluated.
*
* <p>
- * Defaults to <code>System.currentTimeMillis() + getReplayCacheExpires()</code>.
+ * Defaults to <code>Instant.now().plus(getReplayCacheExpires())</code>.
* </p>
*
* <p>
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list