This is an automated email from the ASF dual-hosted git repository.

markt-asf pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/9.0.x by this push:
     new a530811b16 Follow-up to "Report unlimited TTL for sessions that never 
time out..."
a530811b16 is described below

commit a530811b16343ac2c2b8e60b1f62570c6b9e372c
Author: Mark Thomas <[email protected]>
AuthorDate: Wed Oct 7 19:38:13 2026 +0100

    Follow-up to "Report unlimited TTL for sessions that never time out..."
---
 java/org/apache/catalina/manager/JspHelper.java | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/java/org/apache/catalina/manager/JspHelper.java 
b/java/org/apache/catalina/manager/JspHelper.java
index e1241815d3..f2ef8bab76 100644
--- a/java/org/apache/catalina/manager/JspHelper.java
+++ b/java/org/apache/catalina/manager/JspHelper.java
@@ -84,7 +84,7 @@ public class JspHelper {
      */
     public static String getDisplayCreationTimeForSession(Session in_session) {
         try {
-            if (in_session.getCreationTime() == 0) {
+            if (in_session.getCreationTime() <= 0) {
                 return "";
             }
             DateFormat formatter = new SimpleDateFormat(DATE_TIME_FORMAT);
@@ -103,7 +103,7 @@ public class JspHelper {
      */
     public static String getDisplayLastAccessedTimeForSession(Session 
in_session) {
         try {
-            if (in_session.getLastAccessedTime() == 0) {
+            if (in_session.getLastAccessedTime() <= 0) {
                 return "";
             }
             DateFormat formatter = new SimpleDateFormat(DATE_TIME_FORMAT);
@@ -122,7 +122,7 @@ public class JspHelper {
      */
     public static String getDisplayUsedTimeForSession(Session in_session) {
         try {
-            if (in_session.getCreationTime() == 0) {
+            if (in_session.getCreationTime() <= 0) {
                 return "";
             }
         } catch (IllegalStateException ise) {
@@ -136,11 +136,11 @@ public class JspHelper {
      * Returns the formatted time-to-live for the given session.
      *
      * @param in_session the session
-     * @return the formatted TTL string, or "Unlimited" for sessions that 
never time out
+     * @return the formatted TTL string, or the infinity symbol for sessions 
that never time out
      */
     public static String getDisplayTTLForSession(Session in_session) {
         try {
-            if (in_session.getCreationTime() == 0) {
+            if (in_session.getCreationTime() <= 0) {
                 return "";
             }
         } catch (IllegalStateException ise) {
@@ -149,7 +149,8 @@ public class JspHelper {
         }
         long ttl = SessionUtils.getTTLForSession(in_session);
         if (ttl == Long.MAX_VALUE) {
-            return "Unlimited";
+            // Use the infinity symbol here rather than 'Unlimited' or similar 
to avoid i18n.
+            return "\u221e";
         }
         return secondsToTimeString(ttl / 1000);
     }
@@ -162,7 +163,7 @@ public class JspHelper {
      */
     public static String getDisplayInactiveTimeForSession(Session in_session) {
         try {
-            if (in_session.getCreationTime() == 0) {
+            if (in_session.getCreationTime() <= 0) {
                 return "";
             }
         } catch (IllegalStateException ise) {


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to