RFR: 8355301: Simplify Throwable::printStackTrace by replacing inner class with static method [v4]

Alan Bateman alanb at openjdk.org
Wed Apr 23 09:07:50 UTC 2025


On Wed, 23 Apr 2025 08:40:04 GMT, Shaojin Wen <swen at openjdk.org> wrote:

> What should we replace it with? Do you have any suggestions?

The wrapper classes were needed when there were was a mix of synchronized and j.u.concurrent locks in use. With JEP 491 integrated it meant that the java.io classes could be changed back to use synchronized.  Yes, we could do some cleanup in Throwable too. Changing PrintStreamOrWriter to be an interface should be fine but the rest of these changes in this PR doesn't seem necessary. As others have already asked, I think it would be useful to understand what issue you are running into and why you want to change this code.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/24795#discussion_r2055596020


More information about the core-libs-dev mailing list