[java-shib-shared] branch main updated: Javadoc clarification.

Scott Cantor cantor.2 at osu.edu
Wed Jun 18 14:03:21 UTC 2025


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

scantor pushed a commit to branch main
in repository java-shib-shared.

View the commit online:
http://git.shibboleth.net/view/?p=java-shib-shared.git;a=commit;h=2f1b4fa9e0b05f6dc6a1ea1798dc8c970492d5db

The following commit(s) were added to refs/heads/main by this push:
     new 2f1b4fa9 Javadoc clarification.
2f1b4fa9 is described below

commit 2f1b4fa9e0b05f6dc6a1ea1798dc8c970492d5db
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Wed Jun 18 10:03:14 2025 -0400

    Javadoc clarification.
---
 .../main/java/net/shibboleth/shared/net/CookieManager.java | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/shib-networking/src/main/java/net/shibboleth/shared/net/CookieManager.java b/shib-networking/src/main/java/net/shibboleth/shared/net/CookieManager.java
index 7c7b9e33..68b75a44 100644
--- a/shib-networking/src/main/java/net/shibboleth/shared/net/CookieManager.java
+++ b/shib-networking/src/main/java/net/shibboleth/shared/net/CookieManager.java
@@ -288,9 +288,13 @@ public class CookieManager extends AbstractInitializableComponent {
     }
     
     /**
-     * Get maximum age of cookies in seconds.
+     * Get maximum age of cookies in seconds, or -1 for a session cookie.
      * 
-     * @return max age in seconds
+     * <p>Note that this "convention" for -1 is NOT consistent with the RFC and is a hold-over from
+     * Java's native Cookie class, probably because the Integer type didn't exist, so there was no way 
+     * o easily handle a null Max-Age value in the API.</p>
+     * 
+     * @return max age in seconds, or -1 for a session cookie
      * 
      * @since 9.1.0
      */
@@ -299,7 +303,11 @@ public class CookieManager extends AbstractInitializableComponent {
     }
     
     /**
-     * Maximum age in seconds, or -1 for per-session.
+     * Maximum age in seconds, or -1 for a session cookie.
+     * 
+     * <p>Note that this "convention" for -1 is NOT consistent with the RFC and is a hold-over from
+     * Java's native Cookie class, probably because the Integer type didn't exist, so there was no way 
+     * o easily handle a null Max-Age value in the API.</p>
      * 
      * @param age max age to set
      */

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the commits mailing list