[java-opensaml] branch main updated: OSJ-356 - Revocation cache reverses meaning of strict flag
Scott Cantor
cantor.2 at osu.edu
Thu Jul 21 17:15:26 UTC 2022
This is an automated email from the git hooks/post-receive script.
scantor pushed a commit to branch main
in repository java-opensaml.
View the commit online:
http://git.shibboleth.net/view/?p=java-opensaml.git;a=commit;h=91d532f7f6ab267b00db688eb42f63f5d0e1b033
The following commit(s) were added to refs/heads/main by this push:
new 91d532f7f OSJ-356 - Revocation cache reverses meaning of strict flag
91d532f7f is described below
commit 91d532f7f6ab267b00db688eb42f63f5d0e1b033
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Thu Jul 21 13:14:36 2022 -0400
OSJ-356 - Revocation cache reverses meaning of strict flag
https://shibboleth.atlassian.net/browse/OSJ-356
---
.../main/java/org/opensaml/storage/RevocationCache.java | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)
diff --git a/opensaml-storage-api/src/main/java/org/opensaml/storage/RevocationCache.java b/opensaml-storage-api/src/main/java/org/opensaml/storage/RevocationCache.java
index a2cf12180..5a0393f61 100644
--- a/opensaml-storage-api/src/main/java/org/opensaml/storage/RevocationCache.java
+++ b/opensaml-storage-api/src/main/java/org/opensaml/storage/RevocationCache.java
@@ -107,7 +107,7 @@ public class RevocationCache extends AbstractIdentifiableInitializableComponent
/**
* Get the strictness flag.
*
- * @return true iff we should treat storage failures as a replay
+ * @return true iff we should treat storage failures as a revocation
*/
public boolean isStrict() {
return strict;
@@ -116,7 +116,7 @@ public class RevocationCache extends AbstractIdentifiableInitializableComponent
/**
* Set the strictness flag.
*
- * @param flag true iff we should treat storage failures as a replay
+ * @param flag true iff we should treat storage failures as a revocation
*/
public void setStrict(final boolean flag) {
checkSetterPreconditions();
@@ -152,7 +152,7 @@ public class RevocationCache extends AbstractIdentifiableInitializableComponent
* @param s value to revoke
* @param exp entry expiration
*
- * @return true if value has successfully been listed as revoked in the cache.
+ * @return true if value has successfully been listed as revoked in the cache
*/
public synchronized boolean revoke(@Nonnull @NotEmpty final String context, @Nonnull @NotEmpty final String s,
@Nonnull final Duration exp) {
@@ -186,12 +186,12 @@ public class RevocationCache extends AbstractIdentifiableInitializableComponent
}
/**
- * Returns false if the value has successfully been confirmed as not revoked.
+ * Returns true iff the value has been revoked.
*
* @param context a context label to subdivide the cache
- * @param s value to revoke
+ * @param s value to check
*
- * @return false if the check value is not found in the cache
+ * @return true iff the check value is found in the cache
*/
public synchronized boolean isRevoked(@Nonnull @NotEmpty final String context, @Nonnull @NotEmpty final String s) {
final String key;
@@ -215,8 +215,9 @@ public class RevocationCache extends AbstractIdentifiableInitializableComponent
log.debug("Entry '{}' is revoked", s);
return true;
} catch (final IOException e) {
- log.error("Exception reading/writing to storage service, returning {}", strict ? "failure" : "success", e);
- return !strict;
+ log.error("Exception reading/writing to storage service, indicating {}",
+ strict ? "revoked" : "not revoked", e);
+ return strict;
}
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list