BasicOptionPaneUI.addMessageComponents() uses recursion to split message strings at newlines, generating a StackOverflowError when the message string contains an unusually large number of newlines. Fixed by catching StackOverflow and ignoring so that application is not stuck.
------------- Commit messages: - Fix - 8224267: JOptionPane message string with 5000+ newlines produces StackOverflowError - 8224267: JOptionPane message string with 5000+ newlines produces StackOverflowError - 8224267: JOptionPane message string with 5000+ newlines produces StackOverflowError Changes: https://git.openjdk.org/jdk/pull/9388/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=9388&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8224267 Stats: 86 lines in 2 files changed: 65 ins; 3 del; 18 mod Patch: https://git.openjdk.org/jdk/pull/9388.diff Fetch: git fetch https://git.openjdk.org/jdk pull/9388/head:pull/9388 PR: https://git.openjdk.org/jdk/pull/9388
