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

Prasanta Sadhukhan psadhukhan at openjdk.org
Mon Jul 11 09:26:02 UTC 2022


On Fri, 8 Jul 2022 14:07:57 GMT, Alexey Ivanov <aivanov 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.

OK. Seems logical..I guess it could be much less lines that fit in screen but anyways, to be safe I restrict to this.

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

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



More information about the client-libs-dev mailing list