[kaffe] CVS kaffe (kaz): libraries/javalib/java/util/Properties
Kaffe CVS
Kaffe Mailing List <kaffe@kaffe.org>
Sat Mar 20 15:06:03 2004
PatchSet 4543
Date: 2004/03/20 22:58:27
Author: kaz
Branch: HEAD
Tag: (none)
Log:
2004-03-19 Ito Kazumitsu <kaz@maczuka.gcd.org>
* libraries/javalib/java/util/Properties
(load): Delete leading whiltespaces before checking comment characters.
Members:
ChangeLog:1.2121->1.2122
libraries/javalib/java/util/Properties.java:1.22->1.23
Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.2121 kaffe/ChangeLog:1.2122
--- kaffe/ChangeLog:1.2121 Sat Mar 20 19:41:25 2004
+++ kaffe/ChangeLog Sat Mar 20 22:58:27 2004
@@ -1,3 +1,8 @@
+2004-03-19 Ito Kazumitsu <kaz@maczuka.gcd.org>
+
+ * libraries/javalib/java/util/Properties
+ (load): Delete leading whiltespaces before checking comment characters.
+
2004-03-19 Dalibor Topic <robilad@kaffe.org>
* replace/Makefile.am:
@@ -74,7 +79,7 @@
2004-03-17 Ito Kazumitsu <kaz@maczuka.gcd.org>
* libraries/javalib/java/net/ServerSocket.java
- (accept): Close the socket when error occured.
+ (accept): Close the socket when error occurred.
2004-03-17 Dalibor Topic <robilad@kaffe.org>
Index: kaffe/libraries/javalib/java/util/Properties.java
diff -u kaffe/libraries/javalib/java/util/Properties.java:1.22 kaffe/libraries/javalib/java/util/Properties.java:1.23
--- kaffe/libraries/javalib/java/util/Properties.java:1.22 Wed Mar 17 02:53:12 2004
+++ kaffe/libraries/javalib/java/util/Properties.java Sat Mar 20 22:58:29 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 '='