Skip to content

Commit

Permalink
Fix BZ 66331
Browse files Browse the repository at this point in the history
Fix a regression in refactoring for Stack on the SystemLogHandler which caught incorrect exception.
  • Loading branch information
aooohan authored and cesarhernandezgt committed Oct 25, 2023
1 parent 7f02284 commit a905514
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 2 additions & 2 deletions java/org/apache/tomcat/util/log/SystemLogHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
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;

Expand Down Expand Up @@ -83,7 +83,7 @@ public static void startCapture() {
if (!reuse.isEmpty()) {
try {
log = reuse.remove();
} catch (EmptyStackException e) {
} catch (NoSuchElementException e) {
log = new CaptureLog();
}
} else {
Expand Down
5 changes: 5 additions & 0 deletions webapps/docs/changelog.xml
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,11 @@
use of fully qualified class names in 10.1.14 that broke the jdbc-pool.
(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="Other">
Expand Down

0 comments on commit a905514

Please sign in to comment.