summaryrefslogtreecommitdiffstats
path: root/libjava/java/util/Properties.java
diff options
context:
space:
mode:
authortromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>2003-01-31 17:00:01 +0000
committertromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>2003-01-31 17:00:01 +0000
commitf11d77e7d2526b27a35e7fe45a4cb64003b16429 (patch)
tree5299404669bc9d7ab9101193eea42d52ff19ed9c /libjava/java/util/Properties.java
parentff8f2f66b91993b17f9469d8bfd14c2ed864d673 (diff)
downloadppe42-gcc-f11d77e7d2526b27a35e7fe45a4cb64003b16429.tar.gz
ppe42-gcc-f11d77e7d2526b27a35e7fe45a4cb64003b16429.zip
2003-01-31 Julian Dolby <dolby@us.ibm.com>
* java/util/Properties.java (load): Ignore backslash before EOF. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@62186 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/java/util/Properties.java')
-rw-r--r--libjava/java/util/Properties.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/libjava/java/util/Properties.java b/libjava/java/util/Properties.java
index cb77661a397..907ec2c4d7a 100644
--- a/libjava/java/util/Properties.java
+++ b/libjava/java/util/Properties.java
@@ -1,5 +1,5 @@
/* Properties.java -- a set of persistent properties
- Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -271,6 +271,13 @@ label = Name:\\u0020</pre>
{
// The line continues on the next line.
line = reader.readLine();
+
+ // We might have seen a backslash at the end of
+ // the file. The JDK ignores the backslash in
+ // this case, so we follow for compatibility.
+ if (line == null)
+ break;
+
pos = 0;
while (pos < line.length()
&& Character.isWhitespace(c = line.charAt(pos)))
OpenPOWER on IntegriCloud