diff options
author | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-05-16 20:27:48 +0000 |
---|---|---|
committer | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-05-16 20:27:48 +0000 |
commit | 43210388ff1e6df13d32f774db8851626206a9d2 (patch) | |
tree | 056b5f30ef5d07852d3e1c3cef8cd88c807edd57 | |
parent | 4ce3a6dcda118374166d16508fa575af101cf13d (diff) | |
download | gcc-43210388ff1e6df13d32f774db8851626206a9d2.tar.gz |
PR libgcj/21606:
* java/net/URI.java (unquote): Handle lower-case letters as well.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@99792 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | libjava/ChangeLog | 5 | ||||
-rw-r--r-- | libjava/java/net/URI.java | 5 |
2 files changed, 7 insertions, 3 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog index 1b35743c61e..94cdae92fef 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,8 @@ +2005-05-16 Tom Tromey <tromey@redhat.com> + + PR libgcj/21606: + * java/net/URI.java (unquote): Handle lower-case letters as well. + 2005-05-16 Ziga Mahkovec <ziga.mahkovec@klika.si> PR libgcj/20504 diff --git a/libjava/java/net/URI.java b/libjava/java/net/URI.java index 95577fca456..c466b719816 100644 --- a/libjava/java/net/URI.java +++ b/libjava/java/net/URI.java @@ -313,9 +313,8 @@ public final class URI { if (i + 2 >= str.length()) throw new URISyntaxException(str, "Invalid quoted character"); - String hex = "0123456789ABCDEF"; - int hi = hex.indexOf(str.charAt(++i)); - int lo = hex.indexOf(str.charAt(++i)); + int hi = Character.digit(str.charAt(++i), 16); + int lo = Character.digit(str.charAt(++i), 16); if (lo < 0 || hi < 0) throw new URISyntaxException(str, "Invalid quoted character"); buf[pos++] = (byte) (hi * 16 + lo); |