summaryrefslogtreecommitdiffstats
path: root/libjava/java/util/Properties.java
diff options
context:
space:
mode:
authormark <mark@138bc75d-0d04-0410-961f-82ee72b054a4>2003-03-02 22:36:20 +0000
committermark <mark@138bc75d-0d04-0410-961f-82ee72b054a4>2003-03-02 22:36:20 +0000
commit468b5607fc75001e8fa5ae42c7784205b9d2d41d (patch)
tree1372fc0161a5eb09a3240f8f83b0500992cc4668 /libjava/java/util/Properties.java
parent469d6fbf6f2f28808390e907a4608c0430d8dfc0 (diff)
downloadppe42-gcc-468b5607fc75001e8fa5ae42c7784205b9d2d41d.tar.gz
ppe42-gcc-468b5607fc75001e8fa5ae42c7784205b9d2d41d.zip
* java/util/Properties.java (load): Only skip line if the first
character is a comment, whitespaces don't count. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@63700 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/java/util/Properties.java')
-rw-r--r--libjava/java/util/Properties.java10
1 files changed, 7 insertions, 3 deletions
diff --git a/libjava/java/util/Properties.java b/libjava/java/util/Properties.java
index 279cf1e7b82..52ca144cb70 100644
--- a/libjava/java/util/Properties.java
+++ b/libjava/java/util/Properties.java
@@ -188,13 +188,17 @@ label = Name:\\u0020</pre>
{
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;
+
while (pos < line.length()
&& Character.isWhitespace(c = line.charAt(pos)))
pos++;
- // If line is empty or begins with a comment character,
- // skip this line.
- if (pos == line.length() || c == '#' || c == '!')
+ // If line is empty skip this line.
+ if (pos == line.length())
continue;
// The characters up to the next Whitespace, ':', or '='
OpenPOWER on IntegriCloud