Bug 66331 - Incorrect exception is being caught in SystemLogHandler
Summary: Incorrect exception is being caught in SystemLogHandler
Status: RESOLVED FIXED
Alias: None
Product: Tomcat 10
Classification: Unclassified
Component: Catalina (show other bugs)
Version: 10.0.27
Hardware: Other All
: P2 normal (vote)
Target Milestone: ------
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-11-01 19:05 UTC by John Carr
Modified: 2022-11-07 14:54 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John Carr 2022-11-01 19:05:14 UTC
When the "reuse" was changed from Stack to Queue in 10.0.25, it seems the `catch` around `log.reuse.remove()` in the SystemLogHandler class should have changed to  catch a `NoSuchElementException`.  

The `NoSuchElementException` is the exception that is thrown when a Queue has no elements.
Comment 1 Han Li 2022-11-02 02:16:48 UTC
Thanks for the report.

Fixed in:
- 10.1.x for 10.1.2 onwards
- 9.0.x for 9.0.69 onwards
- 8.5.x for 8.5.84 onwards
Comment 2 John Carr 2022-11-02 15:11:49 UTC
Can this be fixed in 10.0.28?  We currently cannot move to 10.1.x.
Comment 3 Mark Thomas 2022-11-02 20:05:17 UTC
There are no plans to fix this in 10.0.x since no further 10.0.x releases are planned.

What is stopping you moving to 10.1.x?
Comment 4 John Carr 2022-11-07 14:54:17 UTC
In the end... just time, effort, and priorities.  However, we didn't realize 10.0 was end of life.  Now that we see that, we have added upgrading to 10.1.x into our backlog.

Thanks again for getting the original issue fixed.