Name: tb29552 Date: 09/05/2000
/*
java version "1.3.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0-C)
Java HotSpot(TM) Client VM (build 1.3.0-C, mixed mode)
javac causes an OutOfMemoryError if compiling the following simple class:
*/
public class SwitchTest {
public static final int MEMENTO_NULL = 0x7FFFFFFD;
public static final int MEMENTO_ALLE = 0x7FFFFFFE;
public static final int MEMENTO_LEER = 0x7FFFFFFF;
public static void main(String[] argv) {
int i = MEMENTO_LEER;
switch (i) {
case MEMENTO_NULL:
System.out.println("Null");
break;
case MEMENTO_ALLE:
System.out.println("Alle");
break;
case MEMENTO_LEER:
System.out.println("Leer");
break;
}
}
}
/*
The exact error message is:
The system is out of resources.
Consult the following stack trace for details.
java.lang.OutOfMemoryError
<<no stack trace available>>
*/
(Review ID: 109269)
======================================================================
- duplicates
-
JDK-4455847 Please put fix for #4368309 into final 1.3.1 compiler
- Closed
-
JDK-4428664 javac runs out of memory when compiling certain switch statements
- Closed
- relates to
-
JDK-4249670 out of memory in new javac caused by big "case" values
- Closed
-
JDK-4411025 VM fails to verify switch statement that includes the last integer
- Closed