Name: skT45625 Date: 11/01/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)
The following property file
# comment beginning in first column
# comment with space before #
is read with the program
public class PropTest {
public static void main(String[] args) {
Properties p = new Properties();
try {
FileInputStream in = new FileInputStream("defaultProperties");
p.load(in);
in.close();
} catch (IOException e) {}
p.list(System.out);
}
}
which produces the following output:
-- listing properties --
#=comment with space before #
but the documentation for Properties.load() states:
A line that contains only whitespace or whose first non-whitespace character is
an ASCII # or ! is ignored (thus, # or ! indicate comment lines).
So both lines should be valid comments and be ignored.
(Review ID: 111701)
======================================================================