RFR: 8224267: JOptionPane message string with 5000+ newlines produces StackOverflowError

Alexey Ivanov aivanov at openjdk.org
Fri Jul 8 14:11:43 UTC 2022


On Fri, 8 Jul 2022 13:12:19 GMT, Prasanta Sadhukhan <psadhukhan at openjdk.org> wrote:

> > Maybe we should rather limit the number of recursive calls? You caught `StackOverflowError`, at this stage there's not much space left on the stack. It may cause another `StackOverflowError`.
> 
> I thought that but then thought limiting will not be foolproof as stack size can be modified by -Xss.

If the limit is low, let's say 20-30 lines, it shouldn't be a problem.

I'm afraid a message with more than 200 lines won't fit on the screen anyway.

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

PR: https://git.openjdk.org/jdk/pull/9388



More information about the client-libs-dev mailing list