> 2022年11月2日 10:09,li...@apache.org 写道:
>
> This is an automated email from the ASF dual-hosted git repository.
>
> lihan 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 ee4a1496dd Fix BZ 66330
> ee4a1496dd is described below
>
> commit ee4a1496dd16dfc31142e69527dad496fb28276f
> Author: lihan <li...@apache.org>
> AuthorDate: Wed Nov 2 10:09:18 2022 +0800
>
> Fix BZ 66330
Wrongly written, not 66330 but 66331.
Han
>
> 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 de46e2c392..319be06fe2 100644
> --- a/webapps/docs/changelog.xml
> +++ b/webapps/docs/changelog.xml
> @@ -131,6 +131,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-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: dev-h...@tomcat.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org