[java-opensaml] branch maint-4 updated: OSJ-356 - Revocation cache reverses meaning of strict flag
Scott Cantor
cantor.2 at osu.edu
Thu Jul 21 17:14:39 UTC 2022
This is an automated email from the git hooks/post-receive script.
scantor pushed a commit to branch maint-4
in repository java-opensaml.
View the commit online:
http://git.shibboleth.net/view/?p=java-opensaml.git;a=commit;h=7454062fcd40bee743c3746db8f4779a5e2e8e74
The following commit(s) were added to refs/heads/maint-4 by this push:
new 7454062fc OSJ-356 - Revocation cache reverses meaning of strict flag
7454062fc is described below
commit 7454062fcd40bee743c3746db8f4779a5e2e8e74
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 9da28035c..edef1c23e 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
@@ -108,7 +108,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;
@@ -117,7 +117,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) {
ComponentSupport.ifInitializedThrowUnmodifiabledComponentException(this);
@@ -153,7 +153,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) {
@@ -187,12 +187,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;
@@ -216,8 +216,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