diff options
author | Tom Tromey <tromey@redhat.com> | 2003-01-31 16:55:39 +0000 |
---|---|---|
committer | Tom Tromey <tromey@redhat.com> | 2003-01-31 16:55:39 +0000 |
commit | 42170176777628204333d6ea3ac3f4b9c37ed8da (patch) | |
tree | 12f0e1315eca88aff9a4a14cbdb5c50aeeafe75d | |
parent | eade963f7664ec119ebf5b1e430c763445d588d6 (diff) | |
download | classpath-42170176777628204333d6ea3ac3f4b9c37ed8da.tar.gz |
2003-01-31 Julian Dolby <dolby@us.ibm.com>
* java/util/Properties.java (load): Ignore backslash before EOF.
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | java/util/Properties.java | 9 |
2 files changed, 12 insertions, 1 deletions
@@ -1,3 +1,7 @@ +2003-01-31 Julian Dolby <dolby@us.ibm.com> + + * java/util/Properties.java (load): Ignore backslash before EOF. + 2003-01-30 Tom Tromey <tromey@redhat.com> * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkFontMetrics.c: diff --git a/java/util/Properties.java b/java/util/Properties.java index cb77661a3..907ec2c4d 100644 --- a/java/util/Properties.java +++ b/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))) |