With reference to java.util.Properties#load, Sun's API document says
"A comment line has an ASCII '#' or '!' as its first non-white space
character;" but GNU Classpath's java.util.Properties checkes only
comment characters at the beginning of ach line.
Here is a patch I comitted in Kaffe.
ChangeLog Entry:
2004-03-19 Ito Kazumitsu <[EMAIL PROTECTED]>
* libraries/javalib/java/util/Properties
(load): Delete leading whiltespaces before checking comment characters.
--- java/util/Properties.java.orig Thu Mar 18 01:11:02 2004
+++ java/util/Properties.java Sun Mar 21 07:20:39 2004
@@ -188,17 +188,14 @@
{
char c = 0;
int pos = 0;
- // If empty line or begins with a comment character, skip this line.
- if (line.length() == 0
- || line.charAt(0) == '#' || line.charAt(0) == '!')
- continue;
-
+ // Leading whitespaces must be deleted first.
while (pos < line.length()
&& Character.isWhitespace(c = line.charAt(pos)))
pos++;
- // If line is empty skip this line.
- if (pos == line.length())
+ // If empty line or begins with a comment character, skip this line.
+ if ((line.length() - pos) == 0
+ || line.charAt(pos) == '#' || line.charAt(pos) == '!')
continue;
// The characters up to the next Whitespace, ':', or '='
_______________________________________________
Classpath mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/classpath