You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by li...@apache.org on 2022/11/02 02:14:19 UTC
[tomcat] branch 9.0.x updated: Fix BZ 66331
This is an automated email from the ASF dual-hosted git repository.
lihan 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 9c804a3096 Fix BZ 66331
9c804a3096 is described below
commit 9c804a30969ba1c485daf088b2ac32bdc91442fd
Author: lihan <li...@apache.org>
AuthorDate: Wed Nov 2 10:09:18 2022 +0800
Fix BZ 66331
Fix a regression in refactoring for Stack on the SystemLogHandler which caught incorrect exception.
---
java/org/apache/tomcat/util/log/SystemLogHandler.java | 4 ++--
webapps/docs/changelog.xml | 5 +++++
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/java/org/apache/tomcat/util/log/SystemLogHandler.java b/java/org/apache/tomcat/util/log/SystemLogHandler.java
index 2293f349af..946d9d6d9b 100644
--- a/java/org/apache/tomcat/util/log/SystemLogHandler.java
+++ b/java/org/apache/tomcat/util/log/SystemLogHandler.java
@@ -20,7 +20,7 @@ import java.io.IOException;
import java.io.PrintStream;
import java.util.ArrayDeque;
import java.util.Deque;
-import java.util.EmptyStackException;
+import java.util.NoSuchElementException;
import java.util.Queue;
import java.util.concurrent.ConcurrentLinkedQueue;
@@ -83,7 +83,7 @@ public class SystemLogHandler extends PrintStream {
if (!reuse.isEmpty()) {
try {
log = reuse.remove();
- } catch (EmptyStackException e) {
+ } catch (NoSuchElementException e) {
log = new CaptureLog();
}
} else {
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index c202144015..41ce90711c 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -123,6 +123,11 @@
<code>Context</code> was ignored and the default was always used.
(markt)
</fix>
+ <fix>
+ <bug>66331</bug>: Fix a regression in refactoring for <code>Stack</code>
+ on the <code>SystemLogHandler</code> which caught incorrect exception.
+ (lihan)
+ </fix>
</changelog>
</subsection>
<subsection name="Coyote">
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org