[Bug 69331] NullPointerException (HttpServlet.java:559)

2024-09-20 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=69331

Mark Thomas  changed:

   What|Removed |Added

 Status|NEW |NEEDINFO

--- Comment #1 from Mark Thomas  ---
We are going to need a test case that reproduces this issue to investigate
further. Ideally, we need the simplest possible test case that reproduces the
issue.

You should be able to work-around this issue with
discardRequestsAndResponses="true" on the HTTP/2 UpgradeProtocol.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 69182] Tomcat doesn't seem to call SSLEngine.closeInbound when the HTTPS client disconnects

2024-09-20 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=69182

Mark Thomas  changed:

   What|Removed |Added

 Status|NEEDINFO|RESOLVED
 Resolution|--- |INVALID

--- Comment #6 from Mark Thomas  ---
Closing as per previous comments.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



Re: [PR] fix bz #69316 FastHttpDateFormat - getCurrentDate() returns inaccurate result [tomcat]

2024-09-20 Thread via GitHub


markt-asf commented on PR #751:
URL: https://github.com/apache/tomcat/pull/751#issuecomment-2363434819

   OK. I'll merge this then fix the missing ALv2 header and any other issues 
before porting it to the other versions.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



(tomcat) 02/05: enhance performance and modify test case name

2024-09-20 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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

commit 97b07d849b56a10fe6fd8082bcde8217b102ff81
Author: Chenjp 
AuthorDate: Thu Sep 12 08:37:21 2024 +0800

enhance performance and modify test case name
---
 java/org/apache/tomcat/util/http/FastHttpDateFormat.java| 4 +++-
 .../{TesterFastHttpDateFormat.java => TestFastHttpDateFormat.java}  | 6 +-
 2 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/java/org/apache/tomcat/util/http/FastHttpDateFormat.java 
b/java/org/apache/tomcat/util/http/FastHttpDateFormat.java
index 49830e3dcc..1b83d6e4e7 100644
--- a/java/org/apache/tomcat/util/http/FastHttpDateFormat.java
+++ b/java/org/apache/tomcat/util/http/FastHttpDateFormat.java
@@ -104,8 +104,10 @@ public final class FastHttpDateFormat {
  */
 public static String getCurrentDate() {
 long now = System.currentTimeMillis();
+// Ignore millisecond part.
+now -= now % 1000L;
 // Handle case where time moves backwards (e.g. system time corrected)
-if (now - now%1000L != currentDateGenerated - 
currentDateGenerated%1000L) {
+if (now != currentDateGenerated) {
 currentDate = FORMAT_RFC5322.format(new Date(now));
 currentDateGenerated = now;
 }
diff --git a/test/org/apache/tomcat/util/http/TesterFastHttpDateFormat.java 
b/test/org/apache/tomcat/util/http/TestFastHttpDateFormat.java
similarity index 80%
rename from test/org/apache/tomcat/util/http/TesterFastHttpDateFormat.java
rename to test/org/apache/tomcat/util/http/TestFastHttpDateFormat.java
index f9b17415ae..0c915669f9 100644
--- a/test/org/apache/tomcat/util/http/TesterFastHttpDateFormat.java
+++ b/test/org/apache/tomcat/util/http/TestFastHttpDateFormat.java
@@ -3,7 +3,7 @@ package org.apache.tomcat.util.http;
 import org.junit.Assert;
 import org.junit.Test;
 
-public class TesterFastHttpDateFormat {
+public class TestFastHttpDateFormat {
 @Test
 public void testGetCurrentDateInSameSecond() {
 long now = System.currentTimeMillis();
@@ -13,14 +13,12 @@ public class TesterFastHttpDateFormat {
 }
 now = System.currentTimeMillis();
 String s1 = FastHttpDateFormat.getCurrentDate();
-System.out.println("1st:" + System.currentTimeMillis() + ", " + s1);
 long lastMillisInSameSecond = now - now % 1000 + 900L;
 try {
 Thread.sleep(lastMillisInSameSecond - now);
 } catch (InterruptedException e) {
 }
 String s2 = FastHttpDateFormat.getCurrentDate();
-System.out.println("2nd:" + System.currentTimeMillis() + ", " + s2);
 Assert.assertEquals("Two same RFC5322 format dates are expected.", s1, 
s2);
 }
 
@@ -34,7 +32,6 @@ public class TesterFastHttpDateFormat {
 }
 now = System.currentTimeMillis();
 String s1 = FastHttpDateFormat.getCurrentDate();
-System.out.println("1st:" + System.currentTimeMillis() + ", " + s1);
 long firstMillisOfNextSecond = now - now % 1000 + 1100L;
 try {
 Thread.sleep(firstMillisOfNextSecond - now);
@@ -42,7 +39,6 @@ public class TesterFastHttpDateFormat {
 }
 
 String s2 = FastHttpDateFormat.getCurrentDate();
-System.out.println("2nd:" + System.currentTimeMillis() + ", " + s2);
 Assert.assertFalse("Two different RFC5322 format dates are expected.", 
s1.equals(s2));
 }
 }


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



(tomcat) 04/05: Update FastHttpDateFormat.java

2024-09-20 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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

commit 9a9e15d5eff6ce93e2360bf8d39b03d083058760
Author: Chenjp 
AuthorDate: Fri Sep 13 09:30:29 2024 +0800

Update FastHttpDateFormat.java

Follows markt-asf suggestion, change internal currentDateGenerated unit 
from ms to sec.
---
 java/org/apache/tomcat/util/http/FastHttpDateFormat.java | 15 +++
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/java/org/apache/tomcat/util/http/FastHttpDateFormat.java 
b/java/org/apache/tomcat/util/http/FastHttpDateFormat.java
index df965a8e82..157f451507 100644
--- a/java/org/apache/tomcat/util/http/FastHttpDateFormat.java
+++ b/java/org/apache/tomcat/util/http/FastHttpDateFormat.java
@@ -71,9 +71,9 @@ public final class FastHttpDateFormat {
 }
 
 /**
- * Instant on which the currentDate object was generated.
+ * Instant on which the currentDate object was generated. 
  */
-private static volatile long currentDateGenerated = 0L;
+private static volatile long currentDateGeneratedInSeconds = 0L;
 
 
 /**
@@ -103,12 +103,11 @@ public final class FastHttpDateFormat {
  * @return the HTTP date
  */
 public static String getCurrentDate() {
-long now = System.currentTimeMillis();
-// Ignore millisecond part.
-now -= now % 1000L;
-if (now != currentDateGenerated) {
-currentDate = FORMAT_RFC5322.format(new Date(now));
-currentDateGenerated = now;
+// according rfc5322, date/time data is accurate to the second.
+long nowInSeconds = System.currentTimeMillis() / 1000L;
+if (nowInSeconds != currentDateGeneratedInSeconds) {
+currentDate = FORMAT_RFC5322.format(new Date(nowInSeconds * 
1000L));
+currentDateGeneratedInSeconds = nowInSeconds;
 }
 return currentDate;
 }


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



(tomcat) 01/05: fix bz #69316 with test case.

2024-09-20 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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

commit aaf981ff431db8f2c790be1bc0124604c0d23298
Author: Chenjp 
AuthorDate: Wed Sep 11 16:48:43 2024 +0800

fix bz #69316 with test case.

check whether cached date and current date are in same second.
---
 .../tomcat/util/http/FastHttpDateFormat.java   |  2 +-
 .../tomcat/util/http/TesterFastHttpDateFormat.java | 48 ++
 2 files changed, 49 insertions(+), 1 deletion(-)

diff --git a/java/org/apache/tomcat/util/http/FastHttpDateFormat.java 
b/java/org/apache/tomcat/util/http/FastHttpDateFormat.java
index cbb7be9151..49830e3dcc 100644
--- a/java/org/apache/tomcat/util/http/FastHttpDateFormat.java
+++ b/java/org/apache/tomcat/util/http/FastHttpDateFormat.java
@@ -105,7 +105,7 @@ public final class FastHttpDateFormat {
 public static String getCurrentDate() {
 long now = System.currentTimeMillis();
 // Handle case where time moves backwards (e.g. system time corrected)
-if (Math.abs(now - currentDateGenerated) > 1000) {
+if (now - now%1000L != currentDateGenerated - 
currentDateGenerated%1000L) {
 currentDate = FORMAT_RFC5322.format(new Date(now));
 currentDateGenerated = now;
 }
diff --git a/test/org/apache/tomcat/util/http/TesterFastHttpDateFormat.java 
b/test/org/apache/tomcat/util/http/TesterFastHttpDateFormat.java
new file mode 100644
index 00..f9b17415ae
--- /dev/null
+++ b/test/org/apache/tomcat/util/http/TesterFastHttpDateFormat.java
@@ -0,0 +1,48 @@
+package org.apache.tomcat.util.http;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+public class TesterFastHttpDateFormat {
+@Test
+public void testGetCurrentDateInSameSecond() {
+long now = System.currentTimeMillis();
+try {
+Thread.sleep(1000L - now % 1000);
+} catch (InterruptedException e) {
+}
+now = System.currentTimeMillis();
+String s1 = FastHttpDateFormat.getCurrentDate();
+System.out.println("1st:" + System.currentTimeMillis() + ", " + s1);
+long lastMillisInSameSecond = now - now % 1000 + 900L;
+try {
+Thread.sleep(lastMillisInSameSecond - now);
+} catch (InterruptedException e) {
+}
+String s2 = FastHttpDateFormat.getCurrentDate();
+System.out.println("2nd:" + System.currentTimeMillis() + ", " + s2);
+Assert.assertEquals("Two same RFC5322 format dates are expected.", s1, 
s2);
+}
+
+@Test
+public void testGetCurrentDateNextToAnotherSecond() {
+long now = System.currentTimeMillis();
+
+try {
+Thread.sleep(2000L - now % 1000 + 500L);
+} catch (InterruptedException e) {
+}
+now = System.currentTimeMillis();
+String s1 = FastHttpDateFormat.getCurrentDate();
+System.out.println("1st:" + System.currentTimeMillis() + ", " + s1);
+long firstMillisOfNextSecond = now - now % 1000 + 1100L;
+try {
+Thread.sleep(firstMillisOfNextSecond - now);
+} catch (InterruptedException e) {
+}
+
+String s2 = FastHttpDateFormat.getCurrentDate();
+System.out.println("2nd:" + System.currentTimeMillis() + ", " + s2);
+Assert.assertFalse("Two different RFC5322 format dates are expected.", 
s1.equals(s2));
+}
+}


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



(tomcat) 05/05: Update FastHttpDateFormat.java

2024-09-20 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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

commit f1d866b7f204cff6caa64f93c9500deb5ef99348
Author: Chenjp 
AuthorDate: Fri Sep 13 09:37:30 2024 +0800

Update FastHttpDateFormat.java
---
 java/org/apache/tomcat/util/http/FastHttpDateFormat.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/java/org/apache/tomcat/util/http/FastHttpDateFormat.java 
b/java/org/apache/tomcat/util/http/FastHttpDateFormat.java
index 157f451507..6875d8282f 100644
--- a/java/org/apache/tomcat/util/http/FastHttpDateFormat.java
+++ b/java/org/apache/tomcat/util/http/FastHttpDateFormat.java
@@ -71,7 +71,7 @@ public final class FastHttpDateFormat {
 }
 
 /**
- * Instant on which the currentDate object was generated. 
+ * Instant on which the currentDate object was generated.
  */
 private static volatile long currentDateGeneratedInSeconds = 0L;
 


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



(tomcat) branch 9.0.x updated (9fadc20c1b -> f1d866b7f2)

2024-09-20 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


from 9fadc20c1b Don't overwrite valid Principal from password callback will 
null
 new aaf981ff43 fix bz #69316 with test case.
 new 97b07d849b enhance performance and modify test case name
 new 9ea50c5961 Update FastHttpDateFormat.java
 new 9a9e15d5ef Update FastHttpDateFormat.java
 new f1d866b7f2 Update FastHttpDateFormat.java

The 5 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../tomcat/util/http/FastHttpDateFormat.java   | 12 +++---
 .../tomcat/util/http/TestFastHttpDateFormat.java   | 44 ++
 2 files changed, 50 insertions(+), 6 deletions(-)
 create mode 100644 test/org/apache/tomcat/util/http/TestFastHttpDateFormat.java


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



(tomcat) 03/05: Update FastHttpDateFormat.java

2024-09-20 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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

commit 9ea50c596144c7c5aff51ea47f4cbd4777b1395e
Author: Chenjp 
AuthorDate: Thu Sep 12 09:03:53 2024 +0800

Update FastHttpDateFormat.java

remove unused comment
---
 java/org/apache/tomcat/util/http/FastHttpDateFormat.java | 1 -
 1 file changed, 1 deletion(-)

diff --git a/java/org/apache/tomcat/util/http/FastHttpDateFormat.java 
b/java/org/apache/tomcat/util/http/FastHttpDateFormat.java
index 1b83d6e4e7..df965a8e82 100644
--- a/java/org/apache/tomcat/util/http/FastHttpDateFormat.java
+++ b/java/org/apache/tomcat/util/http/FastHttpDateFormat.java
@@ -106,7 +106,6 @@ public final class FastHttpDateFormat {
 long now = System.currentTimeMillis();
 // Ignore millisecond part.
 now -= now % 1000L;
-// Handle case where time moves backwards (e.g. system time corrected)
 if (now != currentDateGenerated) {
 currentDate = FORMAT_RFC5322.format(new Date(now));
 currentDateGenerated = now;


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



Re: [PR] fix bz #69316 FastHttpDateFormat - getCurrentDate() returns inaccurate result [tomcat]

2024-09-20 Thread via GitHub


markt-asf merged PR #751:
URL: https://github.com/apache/tomcat/pull/751


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



(tomcat) branch 9.0.x updated: Add ALv2 header. Formatting.

2024-09-20 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt 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 1cb8934269 Add ALv2 header. Formatting.
1cb8934269 is described below

commit 1cb89342692009571bf8c5e09edcb10774a86359
Author: Mark Thomas 
AuthorDate: Fri Sep 20 11:53:23 2024 +0100

Add ALv2 header. Formatting.
---
 .../tomcat/util/http/TestFastHttpDateFormat.java| 21 +
 1 file changed, 21 insertions(+)

diff --git a/test/org/apache/tomcat/util/http/TestFastHttpDateFormat.java 
b/test/org/apache/tomcat/util/http/TestFastHttpDateFormat.java
index 0c915669f9..fca12e21b6 100644
--- a/test/org/apache/tomcat/util/http/TestFastHttpDateFormat.java
+++ b/test/org/apache/tomcat/util/http/TestFastHttpDateFormat.java
@@ -1,15 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package org.apache.tomcat.util.http;
 
 import org.junit.Assert;
 import org.junit.Test;
 
 public class TestFastHttpDateFormat {
+
 @Test
 public void testGetCurrentDateInSameSecond() {
 long now = System.currentTimeMillis();
 try {
 Thread.sleep(1000L - now % 1000);
 } catch (InterruptedException e) {
+// Ignore
 }
 now = System.currentTimeMillis();
 String s1 = FastHttpDateFormat.getCurrentDate();
@@ -17,6 +35,7 @@ public class TestFastHttpDateFormat {
 try {
 Thread.sleep(lastMillisInSameSecond - now);
 } catch (InterruptedException e) {
+// Ignore
 }
 String s2 = FastHttpDateFormat.getCurrentDate();
 Assert.assertEquals("Two same RFC5322 format dates are expected.", s1, 
s2);
@@ -29,6 +48,7 @@ public class TestFastHttpDateFormat {
 try {
 Thread.sleep(2000L - now % 1000 + 500L);
 } catch (InterruptedException e) {
+// Ignore
 }
 now = System.currentTimeMillis();
 String s1 = FastHttpDateFormat.getCurrentDate();
@@ -36,6 +56,7 @@ public class TestFastHttpDateFormat {
 try {
 Thread.sleep(firstMillisOfNextSecond - now);
 } catch (InterruptedException e) {
+// Ignore
 }
 
 String s2 = FastHttpDateFormat.getCurrentDate();


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



(tomcat) branch 9.0.x updated: Add BZ 69316 to change log

2024-09-20 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt 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 6c1b71441f Add BZ 69316 to change log
6c1b71441f is described below

commit 6c1b71441f359f4cd218925d44bab8d6c7d5118d
Author: Mark Thomas 
AuthorDate: Fri Sep 20 12:05:00 2024 +0100

Add BZ 69316 to change log
---
 webapps/docs/changelog.xml | 11 +++
 1 file changed, 11 insertions(+)

diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 5b2db7db84..ef4666abd6 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -135,6 +135,17 @@
   
 
   
+  
+
+  
+69316: Ensure that
+FastHttpDateFormat#getCurrentDate() (used to generate Date
+headers for HTTP responses) generates the correct string for the given
+input. Prior to this change, the output may have wrong by one second in
+some cases. (markt)
+  
+
+  
 
 
   


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



(tomcat) branch 9.0.x updated: Add credit

2024-09-20 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt 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 d30bdfd0a6 Add credit
d30bdfd0a6 is described below

commit d30bdfd0a6c8b8f920e3f19d855e157c705cb26e
Author: Mark Thomas 
AuthorDate: Fri Sep 20 12:08:30 2024 +0100

Add credit
---
 webapps/docs/changelog.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index ef4666abd6..008f64ce7c 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -142,7 +142,7 @@
 FastHttpDateFormat#getCurrentDate() (used to generate Date
 headers for HTTP responses) generates the correct string for the given
 input. Prior to this change, the output may have wrong by one second in
-some cases. (markt)
+some cases. Pull request 751 provided by Chenjp. (markt)
   
 
   


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



(tomcat) branch 10.1.x updated: fix bz #69316 with test case.

2024-09-20 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/10.1.x by this push:
 new d1e2cb5a9d fix bz #69316 with test case.
d1e2cb5a9d is described below

commit d1e2cb5a9d1f85599fe9e694e604ccf36c422a32
Author: Chenjp 
AuthorDate: Wed Sep 11 16:48:43 2024 +0800

fix bz #69316 with test case.

check whether cached date and current date are in same second.
---
 .../tomcat/util/http/FastHttpDateFormat.java   | 12 ++--
 .../tomcat/util/http/TestFastHttpDateFormat.java   | 65 ++
 webapps/docs/changelog.xml | 11 
 3 files changed, 82 insertions(+), 6 deletions(-)

diff --git a/java/org/apache/tomcat/util/http/FastHttpDateFormat.java 
b/java/org/apache/tomcat/util/http/FastHttpDateFormat.java
index f48913bad8..80e6e572e3 100644
--- a/java/org/apache/tomcat/util/http/FastHttpDateFormat.java
+++ b/java/org/apache/tomcat/util/http/FastHttpDateFormat.java
@@ -64,7 +64,7 @@ public final class FastHttpDateFormat {
 /**
  * Instant on which the currentDate object was generated.
  */
-private static volatile long currentDateGenerated = 0L;
+private static volatile long currentDateGeneratedInSeconds = 0L;
 
 
 /**
@@ -94,11 +94,11 @@ public final class FastHttpDateFormat {
  * @return the HTTP date
  */
 public static String getCurrentDate() {
-long now = System.currentTimeMillis();
-// Handle case where time moves backwards (e.g. system time corrected)
-if (Math.abs(now - currentDateGenerated) > 1000) {
-currentDate = FORMAT_RFC5322.format(new Date(now));
-currentDateGenerated = now;
+// according rfc5322, date/time data is accurate to the second.
+long nowInSeconds = System.currentTimeMillis() / 1000L;
+if (nowInSeconds != currentDateGeneratedInSeconds) {
+currentDate = FORMAT_RFC5322.format(new Date(nowInSeconds * 
1000L));
+currentDateGeneratedInSeconds = nowInSeconds;
 }
 return currentDate;
 }
diff --git a/test/org/apache/tomcat/util/http/TestFastHttpDateFormat.java 
b/test/org/apache/tomcat/util/http/TestFastHttpDateFormat.java
new file mode 100644
index 00..fca12e21b6
--- /dev/null
+++ b/test/org/apache/tomcat/util/http/TestFastHttpDateFormat.java
@@ -0,0 +1,65 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.tomcat.util.http;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+public class TestFastHttpDateFormat {
+
+@Test
+public void testGetCurrentDateInSameSecond() {
+long now = System.currentTimeMillis();
+try {
+Thread.sleep(1000L - now % 1000);
+} catch (InterruptedException e) {
+// Ignore
+}
+now = System.currentTimeMillis();
+String s1 = FastHttpDateFormat.getCurrentDate();
+long lastMillisInSameSecond = now - now % 1000 + 900L;
+try {
+Thread.sleep(lastMillisInSameSecond - now);
+} catch (InterruptedException e) {
+// Ignore
+}
+String s2 = FastHttpDateFormat.getCurrentDate();
+Assert.assertEquals("Two same RFC5322 format dates are expected.", s1, 
s2);
+}
+
+@Test
+public void testGetCurrentDateNextToAnotherSecond() {
+long now = System.currentTimeMillis();
+
+try {
+Thread.sleep(2000L - now % 1000 + 500L);
+} catch (InterruptedException e) {
+// Ignore
+}
+now = System.currentTimeMillis();
+String s1 = FastHttpDateFormat.getCurrentDate();
+long firstMillisOfNextSecond = now - now % 1000 + 1100L;
+try {
+Thread.sleep(firstMillisOfNextSecond - now);
+} catch (InterruptedException e) {
+// Ignore
+}
+
+String s2 = FastHttpDateFormat.getCurrentDate();
+Assert.assertFalse("Two different RFC5322 format dates are expected.", 
s1.equals(s2));
+}
+}
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 3bfc6b30e1..e765f

(tomcat) branch 11.0.x updated: fix bz #69316 with test case.

2024-09-20 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/11.0.x by this push:
 new 08cbb69919 fix bz #69316 with test case.
08cbb69919 is described below

commit 08cbb69919bbea8b4245ba1e1d07d046585e14c5
Author: Chenjp 
AuthorDate: Wed Sep 11 16:48:43 2024 +0800

fix bz #69316 with test case.

check whether cached date and current date are in same second.
---
 .../tomcat/util/http/FastHttpDateFormat.java   | 12 ++--
 .../tomcat/util/http/TestFastHttpDateFormat.java   | 65 ++
 webapps/docs/changelog.xml | 11 
 3 files changed, 82 insertions(+), 6 deletions(-)

diff --git a/java/org/apache/tomcat/util/http/FastHttpDateFormat.java 
b/java/org/apache/tomcat/util/http/FastHttpDateFormat.java
index f48913bad8..80e6e572e3 100644
--- a/java/org/apache/tomcat/util/http/FastHttpDateFormat.java
+++ b/java/org/apache/tomcat/util/http/FastHttpDateFormat.java
@@ -64,7 +64,7 @@ public final class FastHttpDateFormat {
 /**
  * Instant on which the currentDate object was generated.
  */
-private static volatile long currentDateGenerated = 0L;
+private static volatile long currentDateGeneratedInSeconds = 0L;
 
 
 /**
@@ -94,11 +94,11 @@ public final class FastHttpDateFormat {
  * @return the HTTP date
  */
 public static String getCurrentDate() {
-long now = System.currentTimeMillis();
-// Handle case where time moves backwards (e.g. system time corrected)
-if (Math.abs(now - currentDateGenerated) > 1000) {
-currentDate = FORMAT_RFC5322.format(new Date(now));
-currentDateGenerated = now;
+// according rfc5322, date/time data is accurate to the second.
+long nowInSeconds = System.currentTimeMillis() / 1000L;
+if (nowInSeconds != currentDateGeneratedInSeconds) {
+currentDate = FORMAT_RFC5322.format(new Date(nowInSeconds * 
1000L));
+currentDateGeneratedInSeconds = nowInSeconds;
 }
 return currentDate;
 }
diff --git a/test/org/apache/tomcat/util/http/TestFastHttpDateFormat.java 
b/test/org/apache/tomcat/util/http/TestFastHttpDateFormat.java
new file mode 100644
index 00..fca12e21b6
--- /dev/null
+++ b/test/org/apache/tomcat/util/http/TestFastHttpDateFormat.java
@@ -0,0 +1,65 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.tomcat.util.http;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+public class TestFastHttpDateFormat {
+
+@Test
+public void testGetCurrentDateInSameSecond() {
+long now = System.currentTimeMillis();
+try {
+Thread.sleep(1000L - now % 1000);
+} catch (InterruptedException e) {
+// Ignore
+}
+now = System.currentTimeMillis();
+String s1 = FastHttpDateFormat.getCurrentDate();
+long lastMillisInSameSecond = now - now % 1000 + 900L;
+try {
+Thread.sleep(lastMillisInSameSecond - now);
+} catch (InterruptedException e) {
+// Ignore
+}
+String s2 = FastHttpDateFormat.getCurrentDate();
+Assert.assertEquals("Two same RFC5322 format dates are expected.", s1, 
s2);
+}
+
+@Test
+public void testGetCurrentDateNextToAnotherSecond() {
+long now = System.currentTimeMillis();
+
+try {
+Thread.sleep(2000L - now % 1000 + 500L);
+} catch (InterruptedException e) {
+// Ignore
+}
+now = System.currentTimeMillis();
+String s1 = FastHttpDateFormat.getCurrentDate();
+long firstMillisOfNextSecond = now - now % 1000 + 1100L;
+try {
+Thread.sleep(firstMillisOfNextSecond - now);
+} catch (InterruptedException e) {
+// Ignore
+}
+
+String s2 = FastHttpDateFormat.getCurrentDate();
+Assert.assertFalse("Two different RFC5322 format dates are expected.", 
s1.equals(s2));
+}
+}
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 5718f5898d..2f12a

(tomcat) branch main updated: fix bz #69316 with test case.

2024-09-20 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/main by this push:
 new dcbbfe5d29 fix bz #69316 with test case.
dcbbfe5d29 is described below

commit dcbbfe5d29a92fd1a7ffca0a179c9d9df7b4651c
Author: Chenjp 
AuthorDate: Wed Sep 11 16:48:43 2024 +0800

fix bz #69316 with test case.

check whether cached date and current date are in same second.
---
 .../tomcat/util/http/FastHttpDateFormat.java   | 12 ++--
 .../tomcat/util/http/TestFastHttpDateFormat.java   | 65 ++
 2 files changed, 71 insertions(+), 6 deletions(-)

diff --git a/java/org/apache/tomcat/util/http/FastHttpDateFormat.java 
b/java/org/apache/tomcat/util/http/FastHttpDateFormat.java
index f48913bad8..80e6e572e3 100644
--- a/java/org/apache/tomcat/util/http/FastHttpDateFormat.java
+++ b/java/org/apache/tomcat/util/http/FastHttpDateFormat.java
@@ -64,7 +64,7 @@ public final class FastHttpDateFormat {
 /**
  * Instant on which the currentDate object was generated.
  */
-private static volatile long currentDateGenerated = 0L;
+private static volatile long currentDateGeneratedInSeconds = 0L;
 
 
 /**
@@ -94,11 +94,11 @@ public final class FastHttpDateFormat {
  * @return the HTTP date
  */
 public static String getCurrentDate() {
-long now = System.currentTimeMillis();
-// Handle case where time moves backwards (e.g. system time corrected)
-if (Math.abs(now - currentDateGenerated) > 1000) {
-currentDate = FORMAT_RFC5322.format(new Date(now));
-currentDateGenerated = now;
+// according rfc5322, date/time data is accurate to the second.
+long nowInSeconds = System.currentTimeMillis() / 1000L;
+if (nowInSeconds != currentDateGeneratedInSeconds) {
+currentDate = FORMAT_RFC5322.format(new Date(nowInSeconds * 
1000L));
+currentDateGeneratedInSeconds = nowInSeconds;
 }
 return currentDate;
 }
diff --git a/test/org/apache/tomcat/util/http/TestFastHttpDateFormat.java 
b/test/org/apache/tomcat/util/http/TestFastHttpDateFormat.java
new file mode 100644
index 00..fca12e21b6
--- /dev/null
+++ b/test/org/apache/tomcat/util/http/TestFastHttpDateFormat.java
@@ -0,0 +1,65 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.tomcat.util.http;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+public class TestFastHttpDateFormat {
+
+@Test
+public void testGetCurrentDateInSameSecond() {
+long now = System.currentTimeMillis();
+try {
+Thread.sleep(1000L - now % 1000);
+} catch (InterruptedException e) {
+// Ignore
+}
+now = System.currentTimeMillis();
+String s1 = FastHttpDateFormat.getCurrentDate();
+long lastMillisInSameSecond = now - now % 1000 + 900L;
+try {
+Thread.sleep(lastMillisInSameSecond - now);
+} catch (InterruptedException e) {
+// Ignore
+}
+String s2 = FastHttpDateFormat.getCurrentDate();
+Assert.assertEquals("Two same RFC5322 format dates are expected.", s1, 
s2);
+}
+
+@Test
+public void testGetCurrentDateNextToAnotherSecond() {
+long now = System.currentTimeMillis();
+
+try {
+Thread.sleep(2000L - now % 1000 + 500L);
+} catch (InterruptedException e) {
+// Ignore
+}
+now = System.currentTimeMillis();
+String s1 = FastHttpDateFormat.getCurrentDate();
+long firstMillisOfNextSecond = now - now % 1000 + 1100L;
+try {
+Thread.sleep(firstMillisOfNextSecond - now);
+} catch (InterruptedException e) {
+// Ignore
+}
+
+String s2 = FastHttpDateFormat.getCurrentDate();
+Assert.assertFalse("Two different RFC5322 format dates are expected.", 
s1.equals(s2));
+}
+}


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-m

[Bug 69316] FastHttpDateFormat#getCurrentDate(): returns inaccurate date string.

2024-09-20 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=69316

Mark Thomas  changed:

   What|Removed |Added

 Resolution|--- |FIXED
 Status|NEW |RESOLVED

--- Comment #2 from Mark Thomas  ---
Fixed in:
- 11.0.x for 11.0.0 onwards
- 10.1.x for 10.1.31 onwards
-  9.0.x for  9.0.96 onwards

Thanks for the PR.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



(tomcat-training) branch main updated: Update ignores to exclude more IDE files

2024-09-20 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/main by this push:
 new cd42413  Update ignores to exclude more IDE files
cd42413 is described below

commit cd42413f91f3209ba2dbd32ad85224f9a9a20145
Author: Mark Thomas 
AuthorDate: Fri Sep 20 08:44:31 2024 +0100

Update ignores to exclude more IDE files
---
 .gitignore | 1 +
 1 file changed, 1 insertion(+)

diff --git a/.gitignore b/.gitignore
index 22a6ca6..c6a8093 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,5 @@
 .project
+.settings
 .idea/
 *.iml
 *.iws


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



(tomcat) branch main updated: Remove the out-dated description and diagram

2024-09-20 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/main by this push:
 new ef8e7dda48 Remove the out-dated description and diagram
ef8e7dda48 is described below

commit ef8e7dda485d1af2e771af9570041befacd4b3cd
Author: Mark Thomas 
AuthorDate: Fri Sep 20 13:53:03 2024 +0100

Remove the out-dated description and diagram
---
 webapps/docs/architecture/startup.xml  |  29 +
 .../docs/architecture/startup/serverStartup.pdf| Bin 46175 -> 0 bytes
 .../docs/architecture/startup/serverStartup.txt| 139 -
 3 files changed, 3 insertions(+), 165 deletions(-)

diff --git a/webapps/docs/architecture/startup.xml 
b/webapps/docs/architecture/startup.xml
index 23e41c1168..c854e55143 100644
--- a/webapps/docs/architecture/startup.xml
+++ b/webapps/docs/architecture/startup.xml
@@ -42,23 +42,6 @@ different ways to start tomcat, including:
   Automatically as a Windows service.
 
 
-
-
-A text description of the startup
-procedure created for Tomcat 5. The updated version of this description for
-Tomcat 12 will be included in the updated diagrams and diagram descriptions in
-the following section. This text file will be removed when that update is
-complete.
-
-
-
-
-
-The UML sequence diagram of the startup
-procedure created for Tomcat 5 is gradually being replaced with updated 
diagrams
-based on Tomcat 12. The scope of these diagrams may be adjusted as they are
-produced.
-
 
 A series of UML diagrams have been created to document the start-up process for
 Tomcat.
@@ -106,20 +89,14 @@ parse the global and application provided configuration 
files to create a merged
 web.xml file that is then used, along with other settings, to configure the web
 application.
 
-
 
-
 
-The startup process can be customized in many ways, both
-by modifying Tomcat code and by implementing your own
-LifecycleListeners which are then registered in the server.xml
-configuration file.
+The startup process can be customized in many ways by implementing your own
+LifecycleListeners which are then registered in the server.xml configuration
+file.
 
 
-
-
 
 
-
 
 
diff --git a/webapps/docs/architecture/startup/serverStartup.pdf 
b/webapps/docs/architecture/startup/serverStartup.pdf
deleted file mode 100644
index 34aa59808b..00
Binary files a/webapps/docs/architecture/startup/serverStartup.pdf and 
/dev/null differ
diff --git a/webapps/docs/architecture/startup/serverStartup.txt 
b/webapps/docs/architecture/startup/serverStartup.txt
deleted file mode 100644
index 9a13d7a707..00
--- a/webapps/docs/architecture/startup/serverStartup.txt
+++ /dev/null
@@ -1,139 +0,0 @@
-  Licensed to the Apache Software Foundation (ASF) under one or more
-  contributor license agreements.  See the NOTICE file distributed with
-  this work for additional information regarding copyright ownership.
-  The ASF licenses this file to You under the Apache License, Version 2.0
-  (the "License"); you may not use this file except in compliance with
-  the License.  You may obtain a copy of the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License.
-
-Tomcat Startup Sequence
-
-Sequence 1. Start from Command Line
-Class: org.apache.catalina.startup.Bootstrap
-What it does:
-a) Set up classloaders
-commonLoader (common)-> System Loader
-sharedLoader (shared)-> commonLoader -> System Loader
-catalinaLoader(server) -> commonLoader -> System Loader
-(by default the commonLoader is used for the
- sharedLoader and the serverLoader)
-b) Load startup class (reflection)
-org.apache.catalina.startup.Catalina
-setParentClassloader -> sharedLoader
-Thread.contextClassloader -> catalinaLoader
-c) Bootstrap.daemon.init() complete
-
-Sequence 2. Process command line argument (start, stop)
-Class: org.apache.catalina.startup.Bootstrap (assume command->start)
-What it does:
-a) Catalina.setAwait(true);
-b) Catalina.load()
-b1) initDirs() -> set properties like
-  catalina.home
-  catalina.base == catalina.home (most cases)
-b2) initNaming
-setProperty(javax.naming.Context.INITIAL_CONTEXT_FACTORY,
-org.apache.naming.java.javaURLContextFactory ->default)
-b3) createStartDigester()
-Configures a digester for the main server.xml elements like
-org.apache.catalina.core.StandardServer (can change of course :)
-org.apache.catali

(tomcat) branch 10.1.x updated: Remove the out-dated description and diagram

2024-09-20 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/10.1.x by this push:
 new c8a288c07e Remove the out-dated description and diagram
c8a288c07e is described below

commit c8a288c07e0025110ea7645355d5e12967b1c1ce
Author: Mark Thomas 
AuthorDate: Fri Sep 20 13:53:03 2024 +0100

Remove the out-dated description and diagram
---
 webapps/docs/architecture/startup.xml  |  29 +
 .../docs/architecture/startup/serverStartup.pdf| Bin 46175 -> 0 bytes
 .../docs/architecture/startup/serverStartup.txt| 139 -
 3 files changed, 3 insertions(+), 165 deletions(-)

diff --git a/webapps/docs/architecture/startup.xml 
b/webapps/docs/architecture/startup.xml
index c95e10495b..c854e55143 100644
--- a/webapps/docs/architecture/startup.xml
+++ b/webapps/docs/architecture/startup.xml
@@ -42,23 +42,6 @@ different ways to start tomcat, including:
   Automatically as a Windows service.
 
 
-
-
-A text description of the startup
-procedure created for Tomcat 5. The updated version of this description for
-Tomcat 11 will be included in the updated diagrams and diagram descriptions in
-the following section. This text file will be removed when that update is
-complete.
-
-
-
-
-
-The UML sequence diagram of the startup
-procedure created for Tomcat 5 is gradually being replaced with updated 
diagrams
-based on Tomcat 11. The scope of these diagrams may be adjusted as they are
-produced.
-
 
 A series of UML diagrams have been created to document the start-up process for
 Tomcat.
@@ -106,20 +89,14 @@ parse the global and application provided configuration 
files to create a merged
 web.xml file that is then used, along with other settings, to configure the web
 application.
 
-
 
-
 
-The startup process can be customized in many ways, both
-by modifying Tomcat code and by implementing your own
-LifecycleListeners which are then registered in the server.xml
-configuration file.
+The startup process can be customized in many ways by implementing your own
+LifecycleListeners which are then registered in the server.xml configuration
+file.
 
 
-
-
 
 
-
 
 
diff --git a/webapps/docs/architecture/startup/serverStartup.pdf 
b/webapps/docs/architecture/startup/serverStartup.pdf
deleted file mode 100644
index 34aa59808b..00
Binary files a/webapps/docs/architecture/startup/serverStartup.pdf and 
/dev/null differ
diff --git a/webapps/docs/architecture/startup/serverStartup.txt 
b/webapps/docs/architecture/startup/serverStartup.txt
deleted file mode 100644
index 9a13d7a707..00
--- a/webapps/docs/architecture/startup/serverStartup.txt
+++ /dev/null
@@ -1,139 +0,0 @@
-  Licensed to the Apache Software Foundation (ASF) under one or more
-  contributor license agreements.  See the NOTICE file distributed with
-  this work for additional information regarding copyright ownership.
-  The ASF licenses this file to You under the Apache License, Version 2.0
-  (the "License"); you may not use this file except in compliance with
-  the License.  You may obtain a copy of the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License.
-
-Tomcat Startup Sequence
-
-Sequence 1. Start from Command Line
-Class: org.apache.catalina.startup.Bootstrap
-What it does:
-a) Set up classloaders
-commonLoader (common)-> System Loader
-sharedLoader (shared)-> commonLoader -> System Loader
-catalinaLoader(server) -> commonLoader -> System Loader
-(by default the commonLoader is used for the
- sharedLoader and the serverLoader)
-b) Load startup class (reflection)
-org.apache.catalina.startup.Catalina
-setParentClassloader -> sharedLoader
-Thread.contextClassloader -> catalinaLoader
-c) Bootstrap.daemon.init() complete
-
-Sequence 2. Process command line argument (start, stop)
-Class: org.apache.catalina.startup.Bootstrap (assume command->start)
-What it does:
-a) Catalina.setAwait(true);
-b) Catalina.load()
-b1) initDirs() -> set properties like
-  catalina.home
-  catalina.base == catalina.home (most cases)
-b2) initNaming
-setProperty(javax.naming.Context.INITIAL_CONTEXT_FACTORY,
-org.apache.naming.java.javaURLContextFactory ->default)
-b3) createStartDigester()
-Configures a digester for the main server.xml elements like
-org.apache.catalina.core.StandardServer (can change of course :)
-org.apache.ca

(tomcat) branch 11.0.x updated: Remove the out-dated description and diagram

2024-09-20 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/11.0.x by this push:
 new 3ca7418df2 Remove the out-dated description and diagram
3ca7418df2 is described below

commit 3ca7418df23119cbd357568d4e584d6d3126d43f
Author: Mark Thomas 
AuthorDate: Fri Sep 20 13:53:03 2024 +0100

Remove the out-dated description and diagram
---
 webapps/docs/architecture/startup.xml  |  29 +
 .../docs/architecture/startup/serverStartup.pdf| Bin 46175 -> 0 bytes
 .../docs/architecture/startup/serverStartup.txt| 139 -
 3 files changed, 3 insertions(+), 165 deletions(-)

diff --git a/webapps/docs/architecture/startup.xml 
b/webapps/docs/architecture/startup.xml
index c95e10495b..c854e55143 100644
--- a/webapps/docs/architecture/startup.xml
+++ b/webapps/docs/architecture/startup.xml
@@ -42,23 +42,6 @@ different ways to start tomcat, including:
   Automatically as a Windows service.
 
 
-
-
-A text description of the startup
-procedure created for Tomcat 5. The updated version of this description for
-Tomcat 11 will be included in the updated diagrams and diagram descriptions in
-the following section. This text file will be removed when that update is
-complete.
-
-
-
-
-
-The UML sequence diagram of the startup
-procedure created for Tomcat 5 is gradually being replaced with updated 
diagrams
-based on Tomcat 11. The scope of these diagrams may be adjusted as they are
-produced.
-
 
 A series of UML diagrams have been created to document the start-up process for
 Tomcat.
@@ -106,20 +89,14 @@ parse the global and application provided configuration 
files to create a merged
 web.xml file that is then used, along with other settings, to configure the web
 application.
 
-
 
-
 
-The startup process can be customized in many ways, both
-by modifying Tomcat code and by implementing your own
-LifecycleListeners which are then registered in the server.xml
-configuration file.
+The startup process can be customized in many ways by implementing your own
+LifecycleListeners which are then registered in the server.xml configuration
+file.
 
 
-
-
 
 
-
 
 
diff --git a/webapps/docs/architecture/startup/serverStartup.pdf 
b/webapps/docs/architecture/startup/serverStartup.pdf
deleted file mode 100644
index 34aa59808b..00
Binary files a/webapps/docs/architecture/startup/serverStartup.pdf and 
/dev/null differ
diff --git a/webapps/docs/architecture/startup/serverStartup.txt 
b/webapps/docs/architecture/startup/serverStartup.txt
deleted file mode 100644
index 9a13d7a707..00
--- a/webapps/docs/architecture/startup/serverStartup.txt
+++ /dev/null
@@ -1,139 +0,0 @@
-  Licensed to the Apache Software Foundation (ASF) under one or more
-  contributor license agreements.  See the NOTICE file distributed with
-  this work for additional information regarding copyright ownership.
-  The ASF licenses this file to You under the Apache License, Version 2.0
-  (the "License"); you may not use this file except in compliance with
-  the License.  You may obtain a copy of the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License.
-
-Tomcat Startup Sequence
-
-Sequence 1. Start from Command Line
-Class: org.apache.catalina.startup.Bootstrap
-What it does:
-a) Set up classloaders
-commonLoader (common)-> System Loader
-sharedLoader (shared)-> commonLoader -> System Loader
-catalinaLoader(server) -> commonLoader -> System Loader
-(by default the commonLoader is used for the
- sharedLoader and the serverLoader)
-b) Load startup class (reflection)
-org.apache.catalina.startup.Catalina
-setParentClassloader -> sharedLoader
-Thread.contextClassloader -> catalinaLoader
-c) Bootstrap.daemon.init() complete
-
-Sequence 2. Process command line argument (start, stop)
-Class: org.apache.catalina.startup.Bootstrap (assume command->start)
-What it does:
-a) Catalina.setAwait(true);
-b) Catalina.load()
-b1) initDirs() -> set properties like
-  catalina.home
-  catalina.base == catalina.home (most cases)
-b2) initNaming
-setProperty(javax.naming.Context.INITIAL_CONTEXT_FACTORY,
-org.apache.naming.java.javaURLContextFactory ->default)
-b3) createStartDigester()
-Configures a digester for the main server.xml elements like
-org.apache.catalina.core.StandardServer (can change of course :)
-org.apache.ca

(tomcat) branch 9.0.x updated: Remove the out-dated description and diagram

2024-09-20 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt 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 639f8ee6c5 Remove the out-dated description and diagram
639f8ee6c5 is described below

commit 639f8ee6c5855c3857071eae0c783ecc1437824e
Author: Mark Thomas 
AuthorDate: Fri Sep 20 13:53:03 2024 +0100

Remove the out-dated description and diagram
---
 webapps/docs/architecture/startup.xml  |  29 +++--
 .../docs/architecture/startup/serverStartup.pdf| Bin 46175 -> 0 bytes
 2 files changed, 3 insertions(+), 26 deletions(-)

diff --git a/webapps/docs/architecture/startup.xml 
b/webapps/docs/architecture/startup.xml
index c95e10495b..c854e55143 100644
--- a/webapps/docs/architecture/startup.xml
+++ b/webapps/docs/architecture/startup.xml
@@ -42,23 +42,6 @@ different ways to start tomcat, including:
   Automatically as a Windows service.
 
 
-
-
-A text description of the startup
-procedure created for Tomcat 5. The updated version of this description for
-Tomcat 11 will be included in the updated diagrams and diagram descriptions in
-the following section. This text file will be removed when that update is
-complete.
-
-
-
-
-
-The UML sequence diagram of the startup
-procedure created for Tomcat 5 is gradually being replaced with updated 
diagrams
-based on Tomcat 11. The scope of these diagrams may be adjusted as they are
-produced.
-
 
 A series of UML diagrams have been created to document the start-up process for
 Tomcat.
@@ -106,20 +89,14 @@ parse the global and application provided configuration 
files to create a merged
 web.xml file that is then used, along with other settings, to configure the web
 application.
 
-
 
-
 
-The startup process can be customized in many ways, both
-by modifying Tomcat code and by implementing your own
-LifecycleListeners which are then registered in the server.xml
-configuration file.
+The startup process can be customized in many ways by implementing your own
+LifecycleListeners which are then registered in the server.xml configuration
+file.
 
 
-
-
 
 
-
 
 
diff --git a/webapps/docs/architecture/startup/serverStartup.pdf 
b/webapps/docs/architecture/startup/serverStartup.pdf
deleted file mode 100644
index 34aa59808b..00
Binary files a/webapps/docs/architecture/startup/serverStartup.pdf and 
/dev/null differ


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 69331] NullPointerException (HttpServlet.java:559)

2024-09-20 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=69331

Mark Thomas  changed:

   What|Removed |Added

 Status|NEW |NEEDINFO

--- Comment #3 from Mark Thomas  ---
No. That addresses the symptom, not the cause. The method should never be null
at that point.

Without a test case that reproduces the issue problem, this issue will
eventually be resolved as INVALID or WORKSFORME.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 69331] NullPointerException (HttpServlet.java:559)

2024-09-20 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=69331

elatl...@gmail.com changed:

   What|Removed |Added

 Status|NEEDINFO|NEW

--- Comment #2 from elatl...@gmail.com ---
No need for a test case when there is a stack trace,
just use standard NPE avoidance practices;

- if (method.equals(METHOD_GET)) {
+ if (METHOD_GET.equals(method)) {

etc.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



(tomcat) branch 11.0.x updated: Code clean-up. Formatting. No functional change.

2024-09-20 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/11.0.x by this push:
 new 97e7781a61 Code clean-up. Formatting. No functional change.
97e7781a61 is described below

commit 97e7781a61c938295821ffc1ed617e59afb8b605
Author: Mark Thomas 
AuthorDate: Fri Sep 20 15:13:42 2024 +0100

Code clean-up. Formatting. No functional change.
---
 .../jasper/compiler/tagplugin/TagPlugin.java   | 11 ++--
 .../compiler/tagplugin/TagPluginContext.java   | 67 +++---
 2 files changed, 39 insertions(+), 39 deletions(-)

diff --git a/java/org/apache/jasper/compiler/tagplugin/TagPlugin.java 
b/java/org/apache/jasper/compiler/tagplugin/TagPlugin.java
index 422794760a..e1711c1d5c 100644
--- a/java/org/apache/jasper/compiler/tagplugin/TagPlugin.java
+++ b/java/org/apache/jasper/compiler/tagplugin/TagPlugin.java
@@ -17,18 +17,17 @@
 package org.apache.jasper.compiler.tagplugin;
 
 /**
- * This interface is to be implemented by the plugin author, to supply
- * an alternate implementation of the tag handlers.  It can be used to
- * specify the Java codes to be generated when a tag is invoked.
- *
- * An implementation of this interface must be registered in a file
- * named "tagPlugins.xml" under WEB-INF.
+ * This interface is to be implemented by the plugin author, to supply an 
alternate implementation of the tag handlers.
+ * It can be used to specify the Java codes to be generated when a tag is 
invoked.
+ * 
+ * An implementation of this interface must be registered in a file named 
"tagPlugins.xml" under WEB-INF.
  */
 
 public interface TagPlugin {
 
 /**
  * Generate codes for a custom tag.
+ *
  * @param ctxt a TagPluginContext for accessing Jasper functions
  */
 void doTag(TagPluginContext ctxt);
diff --git a/java/org/apache/jasper/compiler/tagplugin/TagPluginContext.java 
b/java/org/apache/jasper/compiler/tagplugin/TagPluginContext.java
index b8c7d2bdd7..7f6ad2c098 100644
--- a/java/org/apache/jasper/compiler/tagplugin/TagPluginContext.java
+++ b/java/org/apache/jasper/compiler/tagplugin/TagPluginContext.java
@@ -18,9 +18,8 @@ package org.apache.jasper.compiler.tagplugin;
 
 
 /**
- * This interface allows the plugin author to make inquiries about the
- * properties of the current tag, and to use Jasper resources to generate
- * direct Java codes in place of tag handler invocations.
+ * This interface allows the plugin author to make inquiries about the 
properties of the current tag, and to use Jasper
+ * resources to generate direct Java codes in place of tag handler invocations.
  */
 
 public interface TagPluginContext {
@@ -31,6 +30,7 @@ public interface TagPluginContext {
 
 /**
  * @param attribute Name of the attribute
+ *
  * @return true if the attribute is specified in the tag
  */
 boolean isAttributeSpecified(String attribute);
@@ -42,47 +42,48 @@ public interface TagPluginContext {
 
 /**
  * Generate an import statement
+ *
  * @param s Name of the import class, '*' allowed.
  */
 void generateImport(String s);
 
 /**
- * Generate a declaration in the of the generated class.  This can be
- * used to declare an inner class, a method, or a class variable.
- * @param id A unique ID identifying the declaration.  It is not
- *   part of the declaration, and is used to ensure that the
- *   declaration will only appear once.  If this method is
- *   invoked with the same id more than once in the translation
- *   unit, only the first declaration will be taken.
+ * Generate a declaration in the of the generated class. This can be used 
to declare an inner class, a method, or a
+ * class variable.
+ *
+ * @param id   A unique ID identifying the declaration. It is not part of 
the declaration, and is used to ensure
+ * that the declaration will only appear once. If this 
method is invoked with the same id more than
+ * once in the translation unit, only the first 
declaration will be taken.
  * @param text The text of the declaration.
  */
 void generateDeclaration(String id, String text);
 
 /**
  * Generate Java source code scriptlet
+ *
  * @param s the scriptlet (raw Java source)
  */
 void generateJavaSource(String s);
 
 /**
  * @param attribute The attribute name
- * @return true if the attribute is specified and its value is a
- * translation-time constant.
+ *
+ * @return true if the attribute is specified and its value is a 
translation-time constant.
  */
 boolean isConstantAttribute(String attribute);
 
 /**
  * @param attribute The attribute name
- * @return A string that is the value of a constant attribute.  Undefined
- * 

(tomcat) branch main updated: Code clean-up. Formatting. No functional change.

2024-09-20 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/main by this push:
 new 2681cfc34a Code clean-up. Formatting. No functional change.
2681cfc34a is described below

commit 2681cfc34a945df92e2cd596134d0363f2424249
Author: Mark Thomas 
AuthorDate: Fri Sep 20 15:13:42 2024 +0100

Code clean-up. Formatting. No functional change.
---
 .../jasper/compiler/tagplugin/TagPlugin.java   | 11 ++--
 .../compiler/tagplugin/TagPluginContext.java   | 67 +++---
 2 files changed, 39 insertions(+), 39 deletions(-)

diff --git a/java/org/apache/jasper/compiler/tagplugin/TagPlugin.java 
b/java/org/apache/jasper/compiler/tagplugin/TagPlugin.java
index 422794760a..e1711c1d5c 100644
--- a/java/org/apache/jasper/compiler/tagplugin/TagPlugin.java
+++ b/java/org/apache/jasper/compiler/tagplugin/TagPlugin.java
@@ -17,18 +17,17 @@
 package org.apache.jasper.compiler.tagplugin;
 
 /**
- * This interface is to be implemented by the plugin author, to supply
- * an alternate implementation of the tag handlers.  It can be used to
- * specify the Java codes to be generated when a tag is invoked.
- *
- * An implementation of this interface must be registered in a file
- * named "tagPlugins.xml" under WEB-INF.
+ * This interface is to be implemented by the plugin author, to supply an 
alternate implementation of the tag handlers.
+ * It can be used to specify the Java codes to be generated when a tag is 
invoked.
+ * 
+ * An implementation of this interface must be registered in a file named 
"tagPlugins.xml" under WEB-INF.
  */
 
 public interface TagPlugin {
 
 /**
  * Generate codes for a custom tag.
+ *
  * @param ctxt a TagPluginContext for accessing Jasper functions
  */
 void doTag(TagPluginContext ctxt);
diff --git a/java/org/apache/jasper/compiler/tagplugin/TagPluginContext.java 
b/java/org/apache/jasper/compiler/tagplugin/TagPluginContext.java
index b8c7d2bdd7..7f6ad2c098 100644
--- a/java/org/apache/jasper/compiler/tagplugin/TagPluginContext.java
+++ b/java/org/apache/jasper/compiler/tagplugin/TagPluginContext.java
@@ -18,9 +18,8 @@ package org.apache.jasper.compiler.tagplugin;
 
 
 /**
- * This interface allows the plugin author to make inquiries about the
- * properties of the current tag, and to use Jasper resources to generate
- * direct Java codes in place of tag handler invocations.
+ * This interface allows the plugin author to make inquiries about the 
properties of the current tag, and to use Jasper
+ * resources to generate direct Java codes in place of tag handler invocations.
  */
 
 public interface TagPluginContext {
@@ -31,6 +30,7 @@ public interface TagPluginContext {
 
 /**
  * @param attribute Name of the attribute
+ *
  * @return true if the attribute is specified in the tag
  */
 boolean isAttributeSpecified(String attribute);
@@ -42,47 +42,48 @@ public interface TagPluginContext {
 
 /**
  * Generate an import statement
+ *
  * @param s Name of the import class, '*' allowed.
  */
 void generateImport(String s);
 
 /**
- * Generate a declaration in the of the generated class.  This can be
- * used to declare an inner class, a method, or a class variable.
- * @param id A unique ID identifying the declaration.  It is not
- *   part of the declaration, and is used to ensure that the
- *   declaration will only appear once.  If this method is
- *   invoked with the same id more than once in the translation
- *   unit, only the first declaration will be taken.
+ * Generate a declaration in the of the generated class. This can be used 
to declare an inner class, a method, or a
+ * class variable.
+ *
+ * @param id   A unique ID identifying the declaration. It is not part of 
the declaration, and is used to ensure
+ * that the declaration will only appear once. If this 
method is invoked with the same id more than
+ * once in the translation unit, only the first 
declaration will be taken.
  * @param text The text of the declaration.
  */
 void generateDeclaration(String id, String text);
 
 /**
  * Generate Java source code scriptlet
+ *
  * @param s the scriptlet (raw Java source)
  */
 void generateJavaSource(String s);
 
 /**
  * @param attribute The attribute name
- * @return true if the attribute is specified and its value is a
- * translation-time constant.
+ *
+ * @return true if the attribute is specified and its value is a 
translation-time constant.
  */
 boolean isConstantAttribute(String attribute);
 
 /**
  * @param attribute The attribute name
- * @return A string that is the value of a constant attribute.  Undefined
- * 

(tomcat) branch 10.1.x updated: Code clean-up. Formatting. No functional change.

2024-09-20 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/10.1.x by this push:
 new 6501f66cfe Code clean-up. Formatting. No functional change.
6501f66cfe is described below

commit 6501f66cfe0824ced499148d4a1e8ca57c7f32cb
Author: Mark Thomas 
AuthorDate: Fri Sep 20 15:13:42 2024 +0100

Code clean-up. Formatting. No functional change.
---
 .../jasper/compiler/tagplugin/TagPlugin.java   | 11 ++--
 .../compiler/tagplugin/TagPluginContext.java   | 67 +++---
 2 files changed, 39 insertions(+), 39 deletions(-)

diff --git a/java/org/apache/jasper/compiler/tagplugin/TagPlugin.java 
b/java/org/apache/jasper/compiler/tagplugin/TagPlugin.java
index 422794760a..e1711c1d5c 100644
--- a/java/org/apache/jasper/compiler/tagplugin/TagPlugin.java
+++ b/java/org/apache/jasper/compiler/tagplugin/TagPlugin.java
@@ -17,18 +17,17 @@
 package org.apache.jasper.compiler.tagplugin;
 
 /**
- * This interface is to be implemented by the plugin author, to supply
- * an alternate implementation of the tag handlers.  It can be used to
- * specify the Java codes to be generated when a tag is invoked.
- *
- * An implementation of this interface must be registered in a file
- * named "tagPlugins.xml" under WEB-INF.
+ * This interface is to be implemented by the plugin author, to supply an 
alternate implementation of the tag handlers.
+ * It can be used to specify the Java codes to be generated when a tag is 
invoked.
+ * 
+ * An implementation of this interface must be registered in a file named 
"tagPlugins.xml" under WEB-INF.
  */
 
 public interface TagPlugin {
 
 /**
  * Generate codes for a custom tag.
+ *
  * @param ctxt a TagPluginContext for accessing Jasper functions
  */
 void doTag(TagPluginContext ctxt);
diff --git a/java/org/apache/jasper/compiler/tagplugin/TagPluginContext.java 
b/java/org/apache/jasper/compiler/tagplugin/TagPluginContext.java
index b8c7d2bdd7..7f6ad2c098 100644
--- a/java/org/apache/jasper/compiler/tagplugin/TagPluginContext.java
+++ b/java/org/apache/jasper/compiler/tagplugin/TagPluginContext.java
@@ -18,9 +18,8 @@ package org.apache.jasper.compiler.tagplugin;
 
 
 /**
- * This interface allows the plugin author to make inquiries about the
- * properties of the current tag, and to use Jasper resources to generate
- * direct Java codes in place of tag handler invocations.
+ * This interface allows the plugin author to make inquiries about the 
properties of the current tag, and to use Jasper
+ * resources to generate direct Java codes in place of tag handler invocations.
  */
 
 public interface TagPluginContext {
@@ -31,6 +30,7 @@ public interface TagPluginContext {
 
 /**
  * @param attribute Name of the attribute
+ *
  * @return true if the attribute is specified in the tag
  */
 boolean isAttributeSpecified(String attribute);
@@ -42,47 +42,48 @@ public interface TagPluginContext {
 
 /**
  * Generate an import statement
+ *
  * @param s Name of the import class, '*' allowed.
  */
 void generateImport(String s);
 
 /**
- * Generate a declaration in the of the generated class.  This can be
- * used to declare an inner class, a method, or a class variable.
- * @param id A unique ID identifying the declaration.  It is not
- *   part of the declaration, and is used to ensure that the
- *   declaration will only appear once.  If this method is
- *   invoked with the same id more than once in the translation
- *   unit, only the first declaration will be taken.
+ * Generate a declaration in the of the generated class. This can be used 
to declare an inner class, a method, or a
+ * class variable.
+ *
+ * @param id   A unique ID identifying the declaration. It is not part of 
the declaration, and is used to ensure
+ * that the declaration will only appear once. If this 
method is invoked with the same id more than
+ * once in the translation unit, only the first 
declaration will be taken.
  * @param text The text of the declaration.
  */
 void generateDeclaration(String id, String text);
 
 /**
  * Generate Java source code scriptlet
+ *
  * @param s the scriptlet (raw Java source)
  */
 void generateJavaSource(String s);
 
 /**
  * @param attribute The attribute name
- * @return true if the attribute is specified and its value is a
- * translation-time constant.
+ *
+ * @return true if the attribute is specified and its value is a 
translation-time constant.
  */
 boolean isConstantAttribute(String attribute);
 
 /**
  * @param attribute The attribute name
- * @return A string that is the value of a constant attribute.  Undefined
- * 

(tomcat) branch 9.0.x updated: Code clean-up. Formatting. No functional change.

2024-09-20 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt 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 364cd76946 Code clean-up. Formatting. No functional change.
364cd76946 is described below

commit 364cd7694648abcaca749268c84541a24e225096
Author: Mark Thomas 
AuthorDate: Fri Sep 20 15:13:42 2024 +0100

Code clean-up. Formatting. No functional change.
---
 .../jasper/compiler/tagplugin/TagPlugin.java   | 11 ++--
 .../compiler/tagplugin/TagPluginContext.java   | 67 +++---
 2 files changed, 39 insertions(+), 39 deletions(-)

diff --git a/java/org/apache/jasper/compiler/tagplugin/TagPlugin.java 
b/java/org/apache/jasper/compiler/tagplugin/TagPlugin.java
index 422794760a..e1711c1d5c 100644
--- a/java/org/apache/jasper/compiler/tagplugin/TagPlugin.java
+++ b/java/org/apache/jasper/compiler/tagplugin/TagPlugin.java
@@ -17,18 +17,17 @@
 package org.apache.jasper.compiler.tagplugin;
 
 /**
- * This interface is to be implemented by the plugin author, to supply
- * an alternate implementation of the tag handlers.  It can be used to
- * specify the Java codes to be generated when a tag is invoked.
- *
- * An implementation of this interface must be registered in a file
- * named "tagPlugins.xml" under WEB-INF.
+ * This interface is to be implemented by the plugin author, to supply an 
alternate implementation of the tag handlers.
+ * It can be used to specify the Java codes to be generated when a tag is 
invoked.
+ * 
+ * An implementation of this interface must be registered in a file named 
"tagPlugins.xml" under WEB-INF.
  */
 
 public interface TagPlugin {
 
 /**
  * Generate codes for a custom tag.
+ *
  * @param ctxt a TagPluginContext for accessing Jasper functions
  */
 void doTag(TagPluginContext ctxt);
diff --git a/java/org/apache/jasper/compiler/tagplugin/TagPluginContext.java 
b/java/org/apache/jasper/compiler/tagplugin/TagPluginContext.java
index b8c7d2bdd7..7f6ad2c098 100644
--- a/java/org/apache/jasper/compiler/tagplugin/TagPluginContext.java
+++ b/java/org/apache/jasper/compiler/tagplugin/TagPluginContext.java
@@ -18,9 +18,8 @@ package org.apache.jasper.compiler.tagplugin;
 
 
 /**
- * This interface allows the plugin author to make inquiries about the
- * properties of the current tag, and to use Jasper resources to generate
- * direct Java codes in place of tag handler invocations.
+ * This interface allows the plugin author to make inquiries about the 
properties of the current tag, and to use Jasper
+ * resources to generate direct Java codes in place of tag handler invocations.
  */
 
 public interface TagPluginContext {
@@ -31,6 +30,7 @@ public interface TagPluginContext {
 
 /**
  * @param attribute Name of the attribute
+ *
  * @return true if the attribute is specified in the tag
  */
 boolean isAttributeSpecified(String attribute);
@@ -42,47 +42,48 @@ public interface TagPluginContext {
 
 /**
  * Generate an import statement
+ *
  * @param s Name of the import class, '*' allowed.
  */
 void generateImport(String s);
 
 /**
- * Generate a declaration in the of the generated class.  This can be
- * used to declare an inner class, a method, or a class variable.
- * @param id A unique ID identifying the declaration.  It is not
- *   part of the declaration, and is used to ensure that the
- *   declaration will only appear once.  If this method is
- *   invoked with the same id more than once in the translation
- *   unit, only the first declaration will be taken.
+ * Generate a declaration in the of the generated class. This can be used 
to declare an inner class, a method, or a
+ * class variable.
+ *
+ * @param id   A unique ID identifying the declaration. It is not part of 
the declaration, and is used to ensure
+ * that the declaration will only appear once. If this 
method is invoked with the same id more than
+ * once in the translation unit, only the first 
declaration will be taken.
  * @param text The text of the declaration.
  */
 void generateDeclaration(String id, String text);
 
 /**
  * Generate Java source code scriptlet
+ *
  * @param s the scriptlet (raw Java source)
  */
 void generateJavaSource(String s);
 
 /**
  * @param attribute The attribute name
- * @return true if the attribute is specified and its value is a
- * translation-time constant.
+ *
+ * @return true if the attribute is specified and its value is a 
translation-time constant.
  */
 boolean isConstantAttribute(String attribute);
 
 /**
  * @param attribute The attribute name
- * @return A string that is the value of a constant attribute.  Undefined
- *   

[Bug 69333] Unnecessary code in generated JSPs

2024-09-20 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=69333

--- Comment #1 from Christopher Schultz  ---
(In reply to John Engebretson from comment #0)
> public static void releaseTag(Tag tag, InstanceManager instanceManager,
> boolean reused) {
>   // Caller ensures pool is non-null if reuse is true
>   if (!reused) {
> releaseTag(tag, instanceManager);
>   }
> }
> 
> The generated JSP code includes the hard-coded value "false", which
> short-circuits the releaseTag method and guarantees the line achieves
> nothing.

!false is ... false? And the body of the if-block is skipped?

Maybe I'm misunderstanding what you are saying.

> Put it all together and this is an unnecessary line of code, repeated over
> and over, that has a non-zero impact.  This analysis applies only when the
> generated argument is "false", and this line is clearly required when set to
> "true".
> 
> Preferred solution is to remove the line in all cases when the value is
> "false".  If the try/finally can be simultaneously removed, that's even
> better, and removes yet more instructions.

I think I would agree, as long as the logic is flipped-around.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



Buildbot success in on tomcat-11.0.x

2024-09-20 Thread buildbot
Build status: Build succeeded!
Worker used: bb_worker2_ubuntu
URL: https://ci2.apache.org/#builders/112/builds/1283
Blamelist: Chenjp , Mark Thomas 
Build Text: build successful
Status Detected: restored build
Build Source Stamp: [branch 11.0.x] 97e7781a61c938295821ffc1ed617e59afb8b605


Steps:

  worker_preparation: 0

  git: 0

  shell: 0

  shell_1: 0

  shell_2: 0

  shell_3: 0

  shell_4: 0

  shell_5: 0

  shell_6: 0

  compile: 1

  shell_7: 0

  shell_8: 0

  shell_9: 0

  shell_10: 0

  Rsync docs to nightlies.apache.org: 0

  shell_11: 0

  Rsync RAT to nightlies.apache.org: 0

  compile_1: 1

  shell_12: 0

  Rsync Logs to nightlies.apache.org: 0


-- ASF Buildbot


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 69333] Unnecessary code in generated JSPs

2024-09-20 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=69333

--- Comment #2 from John Engebretson  ---
Yes, sorry for the error.  :)

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 62761] CORS filter example in docs not working in versions since 9.0.9

2024-09-20 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=62761

--- Comment #5 from jhon mulleri  ---
https://go.iu.edu/consent?longurl=https://v2.gogoanimex.me/
https://go.iu.edu/consent?longurl=https://v2.gogoanimex.me/anime
https://go.iu.edu/consent?longurl=https://v2.gogoanimex.me/popular
https://go.iu.edu/consent?longurl=https://v2.gogoanimex.me/movies
https://go.iu.edu/consent?longurl=https://v2.gogoanimex.me/tv-series
https://go.iu.edu/consent?longurl=https://v2.gogoanimex.me/dubbed-anime
https://go.iu.edu/consent?longurl=https://v2.gogoanimex.me/sub-category/ova
https://go.iu.edu/consent?longurl=https://v2.gogoanimex.me/sub-category/ona
https://go.iu.edu/consent?longurl=https://v2.gogoanimex.me/sub-category/special
https://go.iu.edu/consent?longurl=https://v2.gogoanimex.me/status/completed
https://go.iu.edu/consent?longurl=https://v2.gogoanimex.me/status/ongoing
https://go.iu.edu/consent?longurl=https://v2.gogoanimex.me/latest/subbed
https://go.iu.edu/consent?longurl=https://v2.gogoanimex.me/latest/dubbed
https://go.iu.edu/consent?longurl=https://v2.gogoanimex.me/latest/chinese
https://go.iu.edu/consent?longurl=https://v2.gogoanimex.me/new-season
https://go.iu.edu/consent?longurl=https://v2.gogoanimex.me/genre/action
https://go.iu.edu/consent?longurl=https://v2.gogoanimex.me/genre/adventure
https://go.iu.edu/consent?longurl=https://v2.gogoanimex.me/genre/cars
https://go.iu.edu/consent?longurl=https://v2.gogoanimex.me/genre/comedy
https://go.iu.edu/consent?longurl=https://v2.gogoanimex.me/genre/dementia
https://go.iu.edu/consent?longurl=https://v2.gogoanimex.me/genre/demons
https://go.iu.edu/consent?longurl=https://v2.gogoanimex.me/genre/drama
https://go.iu.edu/consent?longurl=https://v2.gogoanimex.me/genre/ecchi
https://go.iu.edu/consent?longurl=https://v2.gogoanimex.me/genre/fantasy
https://go.iu.edu/consent?longurl=https://v2.gogoanimex.me/genre/game
https://go.iu.edu/consent?longurl=https://v2.gogoanimex.me/genre/harem
https://go.iu.edu/consent?longurl=https://v2.gogoanimex.me/genre/historical
https://go.iu.edu/consent?longurl=https://v2.gogoanimex.me/genre/horror
https://go.iu.edu/consent?longurl=https://v2.gogoanimex.me/genre/josei
https://go.iu.edu/consent?longurl=https://v2.gogoanimex.me/genre/kids
https://go.iu.edu/consent?longurl=https://v2.gogoanimex.me/genre/magic
https://go.iu.edu/consent?longurl=https://v2.gogoanimex.me/genre/mecha
https://go.iu.edu/consent?longurl=https://v2.gogoanimex.me/genre/military
https://go.iu.edu/consent?longurl=https://v2.gogoanimex.me/genre/mystery
https://go.iu.edu/consent?longurl=https://v2.gogoanimex.me/genre/parody
https://go.iu.edu/consent?longurl=https://v2.gogoanimex.me/genre/police
https://go.iu.edu/consent?longurl=https://v2.gogoanimex.me/genre/psychological
https://go.iu.edu/consent?longurl=https://v2.gogoanimex.me/genre/romance
https://go.iu.edu/consent?longurl=https://v2.gogoanimex.me/genre/samurai
https://go.iu.edu/consent?longurl=https://v2.gogoanimex.me/genre/school
https://go.iu.edu/consent?longurl=https://v2.gogoanimex.me/genre/sci-fi
https://go.iu.edu/consent?longurl=https://v2.gogoanimex.me/genre/seinen
https://go.iu.edu/consent?longurl=https://v2.gogoanimex.me/genre/shoujo
https://go.iu.edu/consent?longurl=https://v2.gogoanimex.me/genre/shounen
https://go.iu.edu/consent?longurl=https://v2.gogoanimex.me/genre/space
https://go.iu.edu/consent?longurl=https://v2.gogoanimex.me/genre/sports
https://go.iu.edu/consent?longurl=https://v2.gogoanimex.me/genre/supernatural
https://go.iu.edu/consent?longurl=https://v2.gogoanimex.me/genre/thriller
https://go.iu.edu/consent?longurl=https://v2.gogoanimex.me/genre/vampire
https://go.iu.edu/consent?longurl=https://v2.gogoanimex.me/genre/yaoi
https://go.iu.edu/consent?longurl=https://v2.gogoanimex.me/genre/yuri
https://go.iu.edu/consent?longurl=https://v2.gogoanimex.me/sub-category/fall-2024-anime
https://go.iu.edu/consent?longurl=https://v2.gogoanimex.me/sub-category/summer-2024-anime
https://go.iu.edu/consent?longurl=https://v2.gogoanimex.me/sub-category/spring-2024-anime
https://go.iu.edu/consent?longurl=https://v2.gogoanimex.me/sub-category/winter-2024-anime
https://go.iu.edu/consent?longurl=https://v2.gogoanimex.me/sub-category/fall-2023-anime
https://go.iu.edu/consent?longurl=https://v2.gogoanimex.me/sub-category/summer-2023-anime
https://go.iu.edu/consent?longurl=https://v2.gogoanimex.me/sub-category/spring-2023-anime
https://go.iu.edu/consent?longurl=https://v2.gogoanimex.me/sub-category/winter-2023-anime
https://go.iu.edu/consent?longurl=https://v2.gogoanimex.me/sub-category/fall-2022-anime
https://go.iu.edu/consent?longurl=https://v2.gogoanimex.me/sub-category/summer-2022-anime
https://go.iu.edu/consent?longurl=https://v2.gogoanimex.me/sub-category/spring-2022-anime
https://go.iu.edu/consent?longurl=https://v2.gogoanimex.me/sub-category/winter-2022-anime
https://go.iu.edu/consent?longurl=https://v2.gogoanimex.me/sub-category/fall-2021-anime
https://go.iu.edu/consent?longurl=https://v2.gogoanimex.me/sub-cate

[Bug 62761] CORS filter example in docs not working in versions since 9.0.9

2024-09-20 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=62761

--- Comment #6 from jhon mulleri  ---
https://josm.openstreetmap.de/search?q=https://v2.gogoanimex.me/
https://josm.openstreetmap.de/search?q=https://v2.gogoanimex.me/anime
https://josm.openstreetmap.de/search?q=https://v2.gogoanimex.me/popular
https://josm.openstreetmap.de/search?q=https://v2.gogoanimex.me/movies
https://josm.openstreetmap.de/search?q=https://v2.gogoanimex.me/tv-series
https://josm.openstreetmap.de/search?q=https://v2.gogoanimex.me/dubbed-anime
https://josm.openstreetmap.de/search?q=https://v2.gogoanimex.me/sub-category/ova
https://josm.openstreetmap.de/search?q=https://v2.gogoanimex.me/sub-category/ona
https://josm.openstreetmap.de/search?q=https://v2.gogoanimex.me/sub-category/special
https://josm.openstreetmap.de/search?q=https://v2.gogoanimex.me/status/completed
https://josm.openstreetmap.de/search?q=https://v2.gogoanimex.me/status/ongoing
https://josm.openstreetmap.de/search?q=https://v2.gogoanimex.me/latest/subbed
https://josm.openstreetmap.de/search?q=https://v2.gogoanimex.me/latest/dubbed
https://josm.openstreetmap.de/search?q=https://v2.gogoanimex.me/latest/chinese
https://josm.openstreetmap.de/search?q=https://v2.gogoanimex.me/new-season
https://josm.openstreetmap.de/search?q=https://v2.gogoanimex.me/genre/action
https://josm.openstreetmap.de/search?q=https://v2.gogoanimex.me/genre/adventure
https://josm.openstreetmap.de/search?q=https://v2.gogoanimex.me/genre/cars
https://josm.openstreetmap.de/search?q=https://v2.gogoanimex.me/genre/comedy
https://josm.openstreetmap.de/search?q=https://v2.gogoanimex.me/genre/dementia
https://josm.openstreetmap.de/search?q=https://v2.gogoanimex.me/genre/demons
https://josm.openstreetmap.de/search?q=https://v2.gogoanimex.me/genre/drama
https://josm.openstreetmap.de/search?q=https://v2.gogoanimex.me/genre/ecchi
https://josm.openstreetmap.de/search?q=https://v2.gogoanimex.me/genre/fantasy
https://josm.openstreetmap.de/search?q=https://v2.gogoanimex.me/genre/game
https://josm.openstreetmap.de/search?q=https://v2.gogoanimex.me/genre/harem
https://josm.openstreetmap.de/search?q=https://v2.gogoanimex.me/genre/historical
https://josm.openstreetmap.de/search?q=https://v2.gogoanimex.me/genre/horror
https://josm.openstreetmap.de/search?q=https://v2.gogoanimex.me/genre/josei
https://josm.openstreetmap.de/search?q=https://v2.gogoanimex.me/genre/kids
https://josm.openstreetmap.de/search?q=https://v2.gogoanimex.me/genre/magic
https://josm.openstreetmap.de/search?q=https://v2.gogoanimex.me/genre/mecha
https://josm.openstreetmap.de/search?q=https://v2.gogoanimex.me/genre/military
https://josm.openstreetmap.de/search?q=https://v2.gogoanimex.me/genre/mystery
https://josm.openstreetmap.de/search?q=https://v2.gogoanimex.me/genre/parody
https://josm.openstreetmap.de/search?q=https://v2.gogoanimex.me/genre/police
https://josm.openstreetmap.de/search?q=https://v2.gogoanimex.me/genre/psychological
https://josm.openstreetmap.de/search?q=https://v2.gogoanimex.me/genre/romance
https://josm.openstreetmap.de/search?q=https://v2.gogoanimex.me/genre/samurai
https://josm.openstreetmap.de/search?q=https://v2.gogoanimex.me/genre/school
https://josm.openstreetmap.de/search?q=https://v2.gogoanimex.me/genre/sci-fi
https://josm.openstreetmap.de/search?q=https://v2.gogoanimex.me/genre/seinen
https://josm.openstreetmap.de/search?q=https://v2.gogoanimex.me/genre/shoujo
https://josm.openstreetmap.de/search?q=https://v2.gogoanimex.me/genre/shounen
https://josm.openstreetmap.de/search?q=https://v2.gogoanimex.me/genre/space
https://josm.openstreetmap.de/search?q=https://v2.gogoanimex.me/genre/sports
https://josm.openstreetmap.de/search?q=https://v2.gogoanimex.me/genre/supernatural
https://josm.openstreetmap.de/search?q=https://v2.gogoanimex.me/genre/thriller
https://josm.openstreetmap.de/search?q=https://v2.gogoanimex.me/genre/vampire
https://josm.openstreetmap.de/search?q=https://v2.gogoanimex.me/genre/yaoi
https://josm.openstreetmap.de/search?q=https://v2.gogoanimex.me/genre/yuri
https://josm.openstreetmap.de/search?q=https://v2.gogoanimex.me/sub-category/fall-2024-anime
https://josm.openstreetmap.de/search?q=https://v2.gogoanimex.me/sub-category/summer-2024-anime
https://josm.openstreetmap.de/search?q=https://v2.gogoanimex.me/sub-category/spring-2024-anime
https://josm.openstreetmap.de/search?q=https://v2.gogoanimex.me/sub-category/winter-2024-anime
https://josm.openstreetmap.de/search?q=https://v2.gogoanimex.me/sub-category/fall-2023-anime
https://josm.openstreetmap.de/search?q=https://v2.gogoanimex.me/sub-category/summer-2023-anime
https://josm.openstreetmap.de/search?q=https://v2.gogoanimex.me/sub-category/spring-2023-anime
https://josm.openstreetmap.de/search?q=https://v2.gogoanimex.me/sub-category/winter-2023-anime
https://josm.openstreetmap.de/search?q=https://v2.gogoanimex.me/sub-category/fall-2022-anime
https://josm.openstreetmap.de/search?q=https://v2.gogoanimex.me/sub-category/summer-2022-anime
https://josm.openstreetmap.de/

[Bug 62761] CORS filter example in docs not working in versions since 9.0.9

2024-09-20 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=62761

--- Comment #7 from jhon mulleri  ---
https://www.astellas.com/il/en/leaving/?url_=https://v2.gogoanimex.me/
https://www.astellas.com/il/en/leaving/?url_=https://v2.gogoanimex.me/anime
https://www.astellas.com/il/en/leaving/?url_=https://v2.gogoanimex.me/popular
https://www.astellas.com/il/en/leaving/?url_=https://v2.gogoanimex.me/movies
https://www.astellas.com/il/en/leaving/?url_=https://v2.gogoanimex.me/tv-series
https://www.astellas.com/il/en/leaving/?url_=https://v2.gogoanimex.me/dubbed-anime
https://www.astellas.com/il/en/leaving/?url_=https://v2.gogoanimex.me/sub-category/ova
https://www.astellas.com/il/en/leaving/?url_=https://v2.gogoanimex.me/sub-category/ona
https://www.astellas.com/il/en/leaving/?url_=https://v2.gogoanimex.me/sub-category/special
https://www.astellas.com/il/en/leaving/?url_=https://v2.gogoanimex.me/status/completed
https://www.astellas.com/il/en/leaving/?url_=https://v2.gogoanimex.me/status/ongoing
https://www.astellas.com/il/en/leaving/?url_=https://v2.gogoanimex.me/latest/subbed
https://www.astellas.com/il/en/leaving/?url_=https://v2.gogoanimex.me/latest/dubbed
https://www.astellas.com/il/en/leaving/?url_=https://v2.gogoanimex.me/latest/chinese
https://www.astellas.com/il/en/leaving/?url_=https://v2.gogoanimex.me/new-season
https://www.astellas.com/il/en/leaving/?url_=https://v2.gogoanimex.me/genre/action
https://www.astellas.com/il/en/leaving/?url_=https://v2.gogoanimex.me/genre/adventure
https://www.astellas.com/il/en/leaving/?url_=https://v2.gogoanimex.me/genre/cars
https://www.astellas.com/il/en/leaving/?url_=https://v2.gogoanimex.me/genre/comedy
https://www.astellas.com/il/en/leaving/?url_=https://v2.gogoanimex.me/genre/dementia
https://www.astellas.com/il/en/leaving/?url_=https://v2.gogoanimex.me/genre/demons
https://www.astellas.com/il/en/leaving/?url_=https://v2.gogoanimex.me/genre/drama
https://www.astellas.com/il/en/leaving/?url_=https://v2.gogoanimex.me/genre/ecchi
https://www.astellas.com/il/en/leaving/?url_=https://v2.gogoanimex.me/genre/fantasy
https://www.astellas.com/il/en/leaving/?url_=https://v2.gogoanimex.me/genre/game
https://www.astellas.com/il/en/leaving/?url_=https://v2.gogoanimex.me/genre/harem
https://www.astellas.com/il/en/leaving/?url_=https://v2.gogoanimex.me/genre/historical
https://www.astellas.com/il/en/leaving/?url_=https://v2.gogoanimex.me/genre/horror
https://www.astellas.com/il/en/leaving/?url_=https://v2.gogoanimex.me/genre/josei
https://www.astellas.com/il/en/leaving/?url_=https://v2.gogoanimex.me/genre/kids
https://www.astellas.com/il/en/leaving/?url_=https://v2.gogoanimex.me/genre/magic
https://www.astellas.com/il/en/leaving/?url_=https://v2.gogoanimex.me/genre/mecha
https://www.astellas.com/il/en/leaving/?url_=https://v2.gogoanimex.me/genre/military
https://www.astellas.com/il/en/leaving/?url_=https://v2.gogoanimex.me/genre/mystery
https://www.astellas.com/il/en/leaving/?url_=https://v2.gogoanimex.me/genre/parody
https://www.astellas.com/il/en/leaving/?url_=https://v2.gogoanimex.me/genre/police
https://www.astellas.com/il/en/leaving/?url_=https://v2.gogoanimex.me/genre/psychological
https://www.astellas.com/il/en/leaving/?url_=https://v2.gogoanimex.me/genre/romance
https://www.astellas.com/il/en/leaving/?url_=https://v2.gogoanimex.me/genre/samurai
https://www.astellas.com/il/en/leaving/?url_=https://v2.gogoanimex.me/genre/school
https://www.astellas.com/il/en/leaving/?url_=https://v2.gogoanimex.me/genre/sci-fi
https://www.astellas.com/il/en/leaving/?url_=https://v2.gogoanimex.me/genre/seinen
https://www.astellas.com/il/en/leaving/?url_=https://v2.gogoanimex.me/genre/shoujo
https://www.astellas.com/il/en/leaving/?url_=https://v2.gogoanimex.me/genre/shounen
https://www.astellas.com/il/en/leaving/?url_=https://v2.gogoanimex.me/genre/space
https://www.astellas.com/il/en/leaving/?url_=https://v2.gogoanimex.me/genre/sports
https://www.astellas.com/il/en/leaving/?url_=https://v2.gogoanimex.me/genre/supernatural
https://www.astellas.com/il/en/leaving/?url_=https://v2.gogoanimex.me/genre/thriller
https://www.astellas.com/il/en/leaving/?url_=https://v2.gogoanimex.me/genre/vampire
https://www.astellas.com/il/en/leaving/?url_=https://v2.gogoanimex.me/genre/yaoi
https://www.astellas.com/il/en/leaving/?url_=https://v2.gogoanimex.me/genre/yuri
https://www.astellas.com/il/en/leaving/?url_=https://v2.gogoanimex.me/sub-category/fall-2024-anime
https://www.astellas.com/il/en/leaving/?url_=https://v2.gogoanimex.me/sub-category/summer-2024-anime
https://www.astellas.com/il/en/leaving/?url_=https://v2.gogoanimex.me/sub-category/spring-2024-anime
https://www.astellas.com/il/en/leaving/?url_=https://v2.gogoanimex.me/sub-category/winter-2024-anime
https://www.astellas.com/il/en/leaving/?url_=https://v2.gogoanimex.me/sub-category/fall-2023-anime
https://www.astellas.com/il/en/leaving/?url_=https://v2.gogoanimex.me/sub-category/summer-2023-anime
https://www.astellas.com/il/en/leaving/?url_=https://v2.gogoanimex

[Bug 69333] New: Unnecessary code in generated JSPs

2024-09-20 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=69333

Bug ID: 69333
   Summary: Unnecessary code in generated JSPs
   Product: Tomcat 9
   Version: 9.0.x
  Hardware: All
OS: All
Status: NEW
  Severity: normal
  Priority: P2
 Component: Jasper
  Assignee: dev@tomcat.apache.org
  Reporter: jeng...@amazon.com
  Target Milestone: -

Our large, high-traffic system has 1000+ jsps, and more than one class file is
> 1MB (not my fault :) ).  Examination of the generated code identified an
isolated changed that will slightly reduce code size, although with near-zero
runtime impact.  The primary benefit to our system will be smaller class files,
meaning lower aggregate code cache usage.

Referencing generated code such as this:

  private boolean
_jspx_meth_c_005fotherwise_005f30(javax.servlet.jsp.tagext.JspTag
_jspx_th_c_005fchoose_005f34, javax.servlet.jsp.PageContext _jspx_page_context,
int[] _jspx_push_body_count_c_005fforEach_005f21)
  throws java.lang.Throwable {
...
_jsp_getInstanceManager().newInstance(_jspx_th_c_005fotherwise_005f30);
try {
 ...
} finally {
 
org.apache.jasper.runtime.JspRuntimeLibrary.releaseTag(_jspx_th_c_005fotherwise_005f30,
_jsp_getInstanceManager(), false);
}
return false;
  }

The finally block triggers the JSPRuntimeLibrary.releaseTag() method:

public static void releaseTag(Tag tag, InstanceManager instanceManager, boolean
reused) {
  // Caller ensures pool is non-null if reuse is true
  if (!reused) {
releaseTag(tag, instanceManager);
  }
}

The generated JSP code includes the hard-coded value "false", which
short-circuits the releaseTag method and guarantees the line achieves nothing.

One can argue that the JIT compiler will notice this and remove it; however,
this line actually contains two method calls, JspRuntimeLibrary.releaseTag and
_jsp_getInstanceManager().


public org.apache.tomcat.InstanceManager _jsp_getInstanceManager() {
  if (_jsp_instancemanager == null) {
synchronized (this) {
  if (_jsp_instancemanager == null) {
_jsp_instancemanager =
org.apache.jasper.runtime.InstanceManagerFactory.getInstanceManager(getServletConfig());
  }
}
  }
  return _jsp_instancemanager;
}

This method call will almost always return the cached value and therefore be a
very highly-optimized branch... however it must always be checked, and
therefore always be executed.  In addition, the JIT is not guaranteed to inline
the releaseTag() and _jsp_getInstanceManager() methods, in which case it cannot
detect the available optimizations.

Put it all together and this is an unnecessary line of code, repeated over and
over, that has a non-zero impact.  This analysis applies only when the
generated argument is "false", and this line is clearly required when set to
"true".

Preferred solution is to remove the line in all cases when the value is
"false".  If the try/finally can be simultaneously removed, that's even better,
and removes yet more instructions.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1920802 - in /tomcat/site/trunk: docs/security.html xdocs/security.xml

2024-09-20 Thread markt
Author: markt
Date: Fri Sep 20 07:59:54 2024
New Revision: 1920802

URL: http://svn.apache.org/viewvc?rev=1920802&view=rev
Log:
All CVEs for currently supported versions contain links to commits

Modified:
tomcat/site/trunk/docs/security.html
tomcat/site/trunk/xdocs/security.xml

Modified: tomcat/site/trunk/docs/security.html
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/docs/security.html?rev=1920802&r1=1920801&r2=1920802&view=diff
==
--- tomcat/site/trunk/docs/security.html (original)
+++ tomcat/site/trunk/docs/security.html Fri Sep 20 07:59:54 2024
@@ -10,9 +10,7 @@
provided in either in a vulnerability announcement and/or the
vulnerability details listed on these pages. These source patches may be
used by users wishing to build their own local version of Tomcat with 
just
-   that security patch rather than upgrade. Please note that an exercise is
-   currently underway to add links to the commits for all the
-   vulnerabilities listed on these pages.
+   that security patch rather than upgrade.

 Lists of security problems fixed in released versions of Apache Tomcat
are available:

Modified: tomcat/site/trunk/xdocs/security.xml
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/xdocs/security.xml?rev=1920802&r1=1920801&r2=1920802&view=diff
==
--- tomcat/site/trunk/xdocs/security.xml (original)
+++ tomcat/site/trunk/xdocs/security.xml Fri Sep 20 07:59:54 2024
@@ -18,9 +18,7 @@
provided in either in a vulnerability announcement and/or the
vulnerability details listed on these pages. These source patches may be
used by users wishing to build their own local version of Tomcat with 
just
-   that security patch rather than upgrade. Please note that an exercise is
-   currently underway to add links to the commits for all the
-   vulnerabilities listed on these pages.
+   that security patch rather than upgrade.

 Lists of security problems fixed in released versions of Apache Tomcat
are available:



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1920801 - in /tomcat/site/trunk: docs/security.html xdocs/security.xml

2024-09-20 Thread markt
Author: markt
Date: Fri Sep 20 07:59:10 2024
New Revision: 1920801

URL: http://svn.apache.org/viewvc?rev=1920801&view=rev
Log:
Move Tomcat 8 to the EOL version list

Modified:
tomcat/site/trunk/docs/security.html
tomcat/site/trunk/xdocs/security.xml

Modified: tomcat/site/trunk/docs/security.html
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/docs/security.html?rev=1920801&r1=1920800&r2=1920801&view=diff
==
--- tomcat/site/trunk/docs/security.html (original)
+++ tomcat/site/trunk/docs/security.html Fri Sep 20 07:59:10 2024
@@ -23,8 +23,6 @@
   
   Apache Tomcat 9.x Security Vulnerabilities
   
-  Apache Tomcat 8.x Security Vulnerabilities
-  
   Apache Tomcat JK Connectors Security
   Vulnerabilities
   Apache Tomcat APR/native Connector
@@ -36,6 +34,8 @@
 Lists of security problems fixed in versions of Apache Tomcat that may
 be downloaded from the archives are also available:
 
+  Apache Tomcat 8.x Security Vulnerabilities
+  
   Apache Tomcat 7.x Security Vulnerabilities
   
   Apache Tomcat 6.x Security Vulnerabilities

Modified: tomcat/site/trunk/xdocs/security.xml
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/xdocs/security.xml?rev=1920801&r1=1920800&r2=1920801&view=diff
==
--- tomcat/site/trunk/xdocs/security.xml (original)
+++ tomcat/site/trunk/xdocs/security.xml Fri Sep 20 07:59:10 2024
@@ -31,8 +31,6 @@
   
   Apache Tomcat 9.x Security Vulnerabilities
   
-  Apache Tomcat 8.x Security Vulnerabilities
-  
   Apache Tomcat JK Connectors Security
   Vulnerabilities
   Apache Tomcat APR/native Connector
@@ -44,6 +42,8 @@
 Lists of security problems fixed in versions of Apache Tomcat that may
 be downloaded from the archives are also available:
 
+  Apache Tomcat 8.x Security Vulnerabilities
+  
   Apache Tomcat 7.x Security Vulnerabilities
   
   Apache Tomcat 6.x Security Vulnerabilities



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1920803 - in /tomcat/site/trunk: docs/security.html xdocs/security.xml

2024-09-20 Thread markt
Author: markt
Date: Fri Sep 20 08:01:25 2024
New Revision: 1920803

URL: http://svn.apache.org/viewvc?rev=1920803&view=rev
Log:
Clarify currently supported vs EOL

Modified:
tomcat/site/trunk/docs/security.html
tomcat/site/trunk/xdocs/security.xml

Modified: tomcat/site/trunk/docs/security.html
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/docs/security.html?rev=1920803&r1=1920802&r2=1920803&view=diff
==
--- tomcat/site/trunk/docs/security.html (original)
+++ tomcat/site/trunk/docs/security.html Fri Sep 20 08:01:25 2024
@@ -3,8 +3,9 @@
 
 Please note that, except in rare circumstances, binary patches are not
produced for individual vulnerabilities. To obtain the binary fix for a
-   particular vulnerability you should upgrade to an Apache 
Tomcat® version
-   where that vulnerability has been fixed.
+   particular vulnerability you should upgrade to an Apache
+   Tomcat® version where that vulnerability has been
+   fixed.

 Source patches, usually in the form of references to commits, may be
provided in either in a vulnerability announcement and/or the
@@ -12,8 +13,8 @@
used by users wishing to build their own local version of Tomcat with 
just
that security patch rather than upgrade.

-Lists of security problems fixed in released versions of Apache Tomcat
-   are available:
+Lists of security problems fixed in currently supported versions of
+   Apache Tomcat are available:
 
   Apache Tomcat 11.x Security 
Vulnerabilities
   
@@ -29,8 +30,9 @@
   Security Vulnerabilities
 
 
-Lists of security problems fixed in versions of Apache Tomcat that may
-be downloaded from the archives are also available:
+Lists of security problems fixed in versions of Apache Tomcat that have
+   reached end of life and may be downloaded from the archives are also
+   available:
 
   Apache Tomcat 8.x Security Vulnerabilities
   

Modified: tomcat/site/trunk/xdocs/security.xml
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/xdocs/security.xml?rev=1920803&r1=1920802&r2=1920803&view=diff
==
--- tomcat/site/trunk/xdocs/security.xml (original)
+++ tomcat/site/trunk/xdocs/security.xml Fri Sep 20 08:01:25 2024
@@ -11,8 +11,9 @@
 
 Please note that, except in rare circumstances, binary patches are not
produced for individual vulnerabilities. To obtain the binary fix for a
-   particular vulnerability you should upgrade to an Apache 
Tomcat® version
-   where that vulnerability has been fixed.
+   particular vulnerability you should upgrade to an Apache
+   Tomcat® version where that vulnerability has been
+   fixed.

 Source patches, usually in the form of references to commits, may be
provided in either in a vulnerability announcement and/or the
@@ -20,8 +21,8 @@
used by users wishing to build their own local version of Tomcat with 
just
that security patch rather than upgrade.

-Lists of security problems fixed in released versions of Apache Tomcat
-   are available:
+Lists of security problems fixed in currently supported versions of
+   Apache Tomcat are available:
 
   Apache Tomcat 11.x Security 
Vulnerabilities
   
@@ -37,8 +38,9 @@
   Security Vulnerabilities
 
 
-Lists of security problems fixed in versions of Apache Tomcat that may
-be downloaded from the archives are also available:
+Lists of security problems fixed in versions of Apache Tomcat that have
+   reached end of life and may be downloaded from the archives are also
+   available:
 
   Apache Tomcat 8.x Security Vulnerabilities
   



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



(tomcat-training) branch main updated: Updates after a couple of practice runs

2024-09-20 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/main by this push:
 new 09558ba  Updates after a couple of practice runs
09558ba is described below

commit 09558baa8388b462698da42fd1fd88349dc45be0
Author: Mark Thomas 
AuthorDate: Fri Sep 20 08:46:31 2024 +0100

Updates after a couple of practice runs
---
 modules/tomcat-11-jakarta-ee-11.html | 44 +++-
 1 file changed, 28 insertions(+), 16 deletions(-)

diff --git a/modules/tomcat-11-jakarta-ee-11.html 
b/modules/tomcat-11-jakarta-ee-11.html
index 9a45ebd..58cc048 100644
--- a/modules/tomcat-11-jakarta-ee-11.html
+++ b/modules/tomcat-11-jakarta-ee-11.html
@@ -16,54 +16,66 @@
 -->
 
   Agenda
-  Jakarta EE 11
+  Overview
+  Changes
   Tomcat 11
+  Questions
 
 
-  Jakarta EE 11 - Overview
-  Major Tomcat versions are aligned with Servlet specification releases
-  Originally planned for Q1 2024
-  Testing and Compatibility Kits (TCKs) refactoring taking longer than 
expected
-  Slipped to H1 2024 then H2 2024
+  Overview - Versioning
+  Tomcat major versions aligned with Servlet specification releases
+  Servlet specification releases aligned with and Jakarta EE releases
+  Tomcat 11 - Servlet 6.1 - Jakarta EE 11
+  Hope to keep Tomcat major version and Jakarta EE version aligned 
 
 
-  Jakarta EE 11 - Progress
+  Jakarta EE 11 - Tomcat 11
   42 individual specifications - Tomcat implements 6
-  Those 6 are done
-  Tomcat 11 implements all 
-  Tomcat 11 passes the TCK for 5 of 6
+  Those 6 are complete and released
+  Tomcat 11 implements all 6
+  Tomcat 11 passes the TCK all 6
+  Daily testing against 5 TCKs
   Authentication TCK uses different framework - work in progress
 
 
-  Jakarta EE 11 - Key changes
+  Overview - Timing
+  Jakarta EE 10 was released Q3 2022
+  Originally planned for Q1 2024
+  Testing and Compatibility Kits (TCKs) refactoring taking longer than 
expected
+  Slipped to H1 2024 then H2 2024
+  Tomcat 11.0.0-M1 2022-12-05
+  Tomcat 11.0.0 2024-10-09  
+
+
+  Changes - Jakarta EE 11 Platform
   Requires a minimum of Java 17
   No SecurityManager support
 
 
-  Jakarta Servlet - 6.1
+  Changes - Jakarta Servlet - 6.1
   Safe HTTP session access for WebSocket
   Invalid request parameters will always trigger an exception
   HTTP/2 server push is deprecated
   Lots of clarifications
 
 
-  Jakarta Pages - 4.0
+  Changes - Jakarta Pages - 4.0
   Depreacted classes and methods have been removed
   Updated ErrorData to support the new request attribute 
jakarta.servlet.error.query_string
 
 
-  Jakarta WebSocket - 2.2
+  Changes - Jakarta WebSocket - 2.2
   Clarifed the responsibility for sending Ping messages
   Added getSession() method to SendResult
 
 
-  Expression Language - 6.0
+  Changes - Expression Language - 6.0
   Remove all deprecated classes and methods
   Dependency on JavaBeans API is now optional
   Added support for java.util.Optional via OptionalELResolver
 
 
-  Tomcat 11
+  Changes - Tomcat 11
   Specification / RFC updates
   RFC 9218 - HTTP/2 priority frame support
   Generally stricter with invalid input


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1920804 - in /tomcat/site/trunk: docs/security-model.html docs/security.html xdocs/security-model.xml xdocs/security.xml

2024-09-20 Thread markt
Author: markt
Date: Fri Sep 20 08:08:15 2024
New Revision: 1920804

URL: http://svn.apache.org/viewvc?rev=1920804&view=rev
Log:
Link to the security model to describe acceptable vulnerability reports

Modified:
tomcat/site/trunk/docs/security-model.html
tomcat/site/trunk/docs/security.html
tomcat/site/trunk/xdocs/security-model.xml
tomcat/site/trunk/xdocs/security.xml

Modified: tomcat/site/trunk/docs/security-model.html
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/docs/security-model.html?rev=1920804&r1=1920803&r2=1920804&view=diff
==
--- tomcat/site/trunk/docs/security-model.html (original)
+++ tomcat/site/trunk/docs/security-model.html Fri Sep 20 08:08:15 2024
@@ -3,8 +3,6 @@
 
 Introduction
 
-  This security model is currently in DRAFT form.
-
   The Apache Tomcat® Security Team reviews reported
  vulnerabilities against the following security model:
 

Modified: tomcat/site/trunk/docs/security.html
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/docs/security.html?rev=1920804&r1=1920803&r2=1920804&view=diff
==
--- tomcat/site/trunk/docs/security.html (original)
+++ tomcat/site/trunk/docs/security.html Fri Sep 20 08:08:15 2024
@@ -57,18 +57,9 @@
security mailing list first, before disclosing them in a public forum.

 
-Reports of problems that require any of the following will be considered
-   out of scope and will not be accepted by the Tomcat security team. The
-   list is not exhaustive.
-   
- Access to Tomcat's configuration files.
- Deployment of a vulnerable web application.
- Deployment of a malicious web application unless a SecurityManager
- is configured with an appropriate security policy and the web
- application is able to bypass a restriction enforced by the
- SecurityManager.
-   
-
+The Tomcat security model describes
+   what the Tomcat security team will and will not accept as a valid
+   vulnerability report for Tomcat.
 
 Please note that the security mailing list should only be used
for reporting undisclosed security vulnerabilities in Tomcat and 
managing

Modified: tomcat/site/trunk/xdocs/security-model.xml
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/xdocs/security-model.xml?rev=1920804&r1=1920803&r2=1920804&view=diff
==
--- tomcat/site/trunk/xdocs/security-model.xml (original)
+++ tomcat/site/trunk/xdocs/security-model.xml Fri Sep 20 08:08:15 2024
@@ -11,8 +11,6 @@
 
 
 
-  This security model is currently in DRAFT form.
-
   The Apache Tomcat® Security Team reviews reported
  vulnerabilities against the following security model:
 

Modified: tomcat/site/trunk/xdocs/security.xml
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/xdocs/security.xml?rev=1920804&r1=1920803&r2=1920804&view=diff
==
--- tomcat/site/trunk/xdocs/security.xml (original)
+++ tomcat/site/trunk/xdocs/security.xml Fri Sep 20 08:08:15 2024
@@ -67,18 +67,9 @@
security mailing list first, before disclosing them in a public forum.

 
-Reports of problems that require any of the following will be considered
-   out of scope and will not be accepted by the Tomcat security team. The
-   list is not exhaustive.
-   
- Access to Tomcat's configuration files.
- Deployment of a vulnerable web application.
- Deployment of a malicious web application unless a SecurityManager
- is configured with an appropriate security policy and the web
- application is able to bypass a restriction enforced by the
- SecurityManager.
-   
-
+The Tomcat security model describes
+   what the Tomcat security team will and will not accept as a valid
+   vulnerability report for Tomcat.
 
 Please note that the security mailing list should only be used
for reporting undisclosed security vulnerabilities in Tomcat and 
managing



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



Re: [PR] Fix: evict cached MBean when bean descriptor content changed to ensure ManagedBean#getMBeanInfo result is correct. [tomcat]

2024-09-20 Thread via GitHub


markt-asf commented on PR #755:
URL: https://github.com/apache/tomcat/pull/755#issuecomment-2363483158

   Why would MBean info change at runtime? The MBeans pretty much all represent 
Tomcat internals and they don't change structure at runtime. I'm not seeing the 
use case for this.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



Re: [PR] Fix: evict cached MBean when bean descriptor content changed to ensure ManagedBean#getMBeanInfo result is correct. [tomcat]

2024-09-20 Thread via GitHub


rmaucher commented on PR #755:
URL: https://github.com/apache/tomcat/pull/755#issuecomment-2363500940

   In theory this is an upstream issue (commons-modeler), however it is no 
longer maintained.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 69333] Unnecessary code in generated JSPs

2024-09-20 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=69333

--- Comment #3 from Christopher Schultz  ---
Do your tests show that suppressing these calls when the parameter will be
*true* that it still gives a benefit?

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 69333] Unnecessary code in generated JSPs

2024-09-20 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=69333

--- Comment #4 from John Engebretson  ---
My tests show a reduction in .class file size and a small reduction in the
JVM's code cache, but that may be a margin-of-error situation.  This is
definitely not a high-impact change.

I'm okay to close if you think the cost-benefit is poor.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org