-
Bug
-
Resolution: Duplicate
-
P4
-
None
-
1.1.7
-
generic
-
generic
Name: tb29552 Date: 10/06/98
/*
JDK 1.1.5, 1.1.6, 1.1.7 and JDK 1.2:
1. Compile this source code (T.java) and create a properties
file called T.properties. Application will abend with
"Out of Memory" Exception.
2. T.java :
--------------------------------------------------
*/
import java.util.*;
public class T {
public T() {
final String fileName = getClass().getName();
System.out.println("Looking for properties file " + fileName);
PropertyResourceBundle m =
(PropertyResourceBundle) PropertyResourceBundle.getBundle(fileName, Locale.getDefault());
System.out.println("Found: "+m);
}
public static void main(String[] args) {
new T();
}
}
/*
3. Output:
Looking for properties file T
Looking for properties file T
java.lang.OutOfMemoryError
at java.util.ResourceBundle.getLoader(ResourceBundle.java)
at java.util.ResourceBundle.getBundle(ResourceBundle.java)
at T.<init>(T.java:9)
...
*/
(Review ID: 37712)
======================================================================
- duplicates
-
JDK-4083270 ResourceBundle.getBundle() does not check for subclass of ResourceBundle
-
- Resolved
-