Last active
December 14, 2015 00:39
-
-
Save cancerberoSgx/5000883 to your computer and use it in GitHub Desktop.
gwt bug
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* <p>This is a severe GWT bug. System: Gwt 2.5 rc1 - linux - firefox</p> | |
* | |
* <p>The following entry point, executed in devel mode will give a | |
* Java StackOverflow exception:</p> | |
* | |
* <pre> | |
[ERROR] [gwttest3] - Stack overflow; to increase the stack | |
size, use the -Xss flag at startup (java -Xss1M ...)</pre> | |
* | |
* Notes: <Br/> | |
* | |
* - this also happens with non inner classes (classes in its own files)</br> | |
* - For fixing this, I must modify Animal class to the following: </br> | |
* | |
<pre> | |
public static class Animal { | |
Lion lion1; | |
public Animal() { | |
//empty constructor | |
} | |
public Lion1 getLion1() { | |
if(lion1==null) | |
lion1=new Lion(); | |
return lion1; | |
} | |
} | |
</pre> | |
* | |
*/ | |
public class Gwttest3 implements EntryPoint { | |
public void onModuleLoad() { | |
testBug1(); | |
} | |
public static class Animal { | |
Lion lion1; | |
public Animal() { | |
lion1 = new Lion(); | |
} | |
} | |
public static class Lion extends Animal { | |
} | |
private void testBug1() { | |
new Animal(); | |
System.out.println("EEEEE"); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
empty |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment