Exception in thread "AWT-EventQueue-0" java.lang.StackOverflowError, Exception in thread "AWT-EventQ
hi, i have a recursive method.. it works fine (it's when using wordWrap=true) when the StringBuffer input contains 2KB file. When parsing larger file (600KB) i got this exception:
Exception in thread "AWT-EventQueue-0" java.lang.StackOverflowError
at xtext.breakLines(xtext.java:308)
at xtext.breakLines(xtext.java:315)
at xtext.breakLines(xtext.java:318)
at xtext.breakLines(xtext.java:315)
at xtext.breakLines(xtext.java:315)
at xtext.breakLines(xtext.java:315)
at xtext.breakLines(xtext.java:315)
at xtext.breakLines(xtext.java:315)
at xtext.breakLines(xtext.java:315)
at xtext.breakLines(xtext.java:315)
at xtext.breakLines(xtext.java:315)
at xtext.breakLines(xtext.java:315)
at xtext.breforumID=423, hi, i have a recursive method.. it works fine (it's when using wordWrap=true) when the StringBuffer input contains 2KB file. When parsing larger file (600KB) i got this exception:
Exception in thread "AWT-EventQueue-0" java.lang.StackOverflowError
at xtext.breakLines(xtext.java:308)
at xtext.breakLines(xtext.java:315)
at xtext.breakLines(xtext.java:318)
at xtext.breakLines(xtext.java:315)
at xtext.breakLines(xtext.java:315)
at xtext.breakLines(xtext.java:315)
at xtext.breakLines(xtext.java:315)
at xtext.breakLines(xtext.java:315)
at xtext.breakLines(xtext.java:315)
at xtext.breakLines(xtext.java:315)
at xtext.breakLines(xtext.java:315)
at xtext.breakLines(xtext.java:315)
at xtext.breakLines(xtext.java:315)
at xtext.breakLines(xtext.java:315)
at xtext.breakLines(xtext.java:315)
at xtext.breakLines(xtext.java:315)
at xtext.breakLines(xtext.java:315)
at xtext.breakLines(xtext.java:315)
at xtext.breakLines(xtext.java:315)
at xtext.breakLines(xtext.java:318)
then it just repeats from line 318 to another ...
method source:
305 public String breakLines (StringBuffer input,int pos,int lineLength) {
306
307 if (wordWrap) {
308 if (input.length()>lineLength && pos <= input.length()) {
309 if (pos > 1) {
310 boolean currSpace = Character.isSpaceChar(input.charAt(pos));
311 if (currSpace) {
312 input.setCharAt(pos,eol);
313 breakLines (input%2