Patch: FYI: Fix to Properties.java
Tom Tromey
tromey@redhat.com
Mon Sep 10 20:12:00 GMT 2001
I'm checking this in.
Built and tested on x86 Red Hat Linux 6.2.
This fixes a bug reported by Anthony.
Tom
Index: ChangeLog
from Tom Tromey <tromey@redhat.com>
* java/util/Properties.java (load): Correctly read \u sequences.
Report from Anthony Green.
Index: java/util/Properties.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/util/Properties.java,v
retrieving revision 1.9
diff -u -r1.9 Properties.java
--- java/util/Properties.java 2001/09/06 17:16:09 1.9
+++ java/util/Properties.java 2001/09/11 03:06:18
@@ -147,7 +147,7 @@
if (pos == line.length() || c == '#' || c == '!')
continue;
- // The characaters up to the next Whitespace, ':', or '='
+ // The characters up to the next Whitespace, ':', or '='
// describe the key. But look for escape sequences.
StringBuffer key = new StringBuffer();
while (pos < line.length()
@@ -185,6 +185,7 @@
char uni = (char) Integer.parseInt
(line.substring(pos, pos + 4), 16);
key.append(uni);
+ pos += 4;
} // else throw exception?
break;
default:
@@ -247,6 +248,7 @@
char uni = (char) Integer.parseInt
(line.substring(pos, pos + 4), 16);
element.append(uni);
+ pos += 4;
} // else throw exception?
break;
default:
More information about the Java-patches
mailing list