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
This commit is contained in:
parent
cb3b1e7090
commit
92f0ebd126
2 changed files with 7 additions and 3 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue