I found today very weird error, while writing my program. The exception I got while compiling was:
Exception in thread "AWT-EventQueue-0" java.lang.StackOverflowError
at java.util.Stack.push(Unknown Source)
at com.oroinc.text.regex.Perl5Matcher._pushState(Perl5Matcher.java)
at com.oroinc.text.regex.Perl5Matcher._match(Perl5Matcher.java)
/+ many many lines like the last one
as I figured out, error was caused by putting many asterisks '' inside / */ comment, ie:
/*
**************************************** /x22 lines like this
*/
this bug/inconvience exists both in 0017 and 0018 IDEs.
Changing comments from /* */ to // solve this problem.
The Java regular expression library is notoriously bad at backtracking, especially with the Pattern.DOTALL option specified. The IDE needs to break up the search for beginning and end of a /.../ comment into two parts: if a comment begins with "/\*", then find the end "\*/". If possible, search for the end of the comment without relying on the DOTALL to search multiple lines. Search each line independently instead.