-
Bug
-
Resolution: Fixed
-
P3
-
1.2.2
-
beta
-
sparc
-
solaris_2.5
Name: mgC56079 Date: 06/08/99
Javadoc for System.setProperties(Properties) says:
----------------------
If the argument is null, then the current set of system properties is forgotten
----------------------
Javadoc for System.getProperties() says:
----------------------
If there is no current set of system properties, a set of system properties is
first created and initialized.
----------------------
Javadoc for System.getProperty(String) says:
-----------------------
If there is no current set of system properties, a set of system properties is
first created and initialized in the same manner as for the getProperties
method.
-----------------------
But no creation and initialization happens.
----------------------Test.java
import java.util.Properties;
public class Test {
public static void main(String [] argv) {
System.setProperties((Properties)null);
System.getProperties().containsKey("java.version");
}
}
----------------------Output
Exception in thread "main" java.lang.NullPointerException
at Test.main(Test.java, Compiled Code)
----------------------
======================================================================