Commit 371ac725 by Julian Dolby Committed by Tom Tromey

Properties.java (load): Ignore backslash before EOF.

2003-01-31  Julian Dolby  <dolby@us.ibm.com>

	* java/util/Properties.java (load): Ignore backslash before EOF.

From-SVN: r62186
parent db0f613d
2003-01-31 Julian Dolby <dolby@us.ibm.com>
* java/util/Properties.java (load): Ignore backslash before EOF.
2003-01-30 Jeff Sturm <jsturm@one-point.com> 2003-01-30 Jeff Sturm <jsturm@one-point.com>
* java/lang/natClass.cc (initializeClass): Check tables when * java/lang/natClass.cc (initializeClass): Check tables when
......
/* Properties.java -- a set of persistent properties /* 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. This file is part of GNU Classpath.
...@@ -271,6 +271,13 @@ label = Name:\\u0020</pre> ...@@ -271,6 +271,13 @@ label = Name:\\u0020</pre>
{ {
// The line continues on the next line. // The line continues on the next line.
line = reader.readLine(); 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; pos = 0;
while (pos < line.length() while (pos < line.length()
&& Character.isWhitespace(c = line.charAt(pos))) && Character.isWhitespace(c = line.charAt(pos)))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment