Commit 92f0ebd1 by Tom Tromey Committed by Tom Tromey

re PR libgcj/21606 (java.net.URI fails to decode lowercase hex codes)

	PR libgcj/21606:
	* java/net/URI.java (unquote): Handle lower-case letters as well.

From-SVN: r99792
parent cb3b1e70
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
......
......@@ -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);
......
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