| | | 1 | while (index < end) {↵
|
1 | testChar = p_uriSpec.charAt(index);↵ | | 2 | testChar = p_userinfo.charAt(index);↵
|
|
2 | if (testChar == '%') {↵ | | 3 | if (testChar == '%') {↵
|
3 | if (index+2 >= end ||↵ | | 4 | if (index+2 >= end ||↵
|
4 | !isHex(p_uriSpec.charAt(index+1)) ||↵ | | 5 | !isHex(p_userinfo.charAt(index+1)) ||↵
|
5 | !isHex(p_uriSpec.charAt(index+2))) {↵ | | 6 | !isHex(p_userinfo.charAt(index+2))) {↵
|
6 | throw new MalformedURIException(↵ | | 7 | throw new MalformedURIException(↵
|
7 | "Fragment contains invalid escape sequence!");↵ | | 8 | "Userinfo contains invalid escape sequence!");↵
|
8 | }↵ | | 9 | }↵
|
9 | index += 2;↵ | | |
|
10 | }↵ | | 10 | }↵
|
11 | else if (!isURICharacter(testChar)) {↵ | | 11 | else if (!isUserinfoCharacter(testChar)) {↵
|
12 | throw new MalformedURIException(↵ | | 12 | throw new MalformedURIException(↵
|
13 | "Fragment contains invalid character: "+testChar);↵ | | 13 | "Userinfo contains invalid character:"+testChar);↵
|
14 | }↵ | | 14 | }↵
|
15 | index++;↵ | | 15 | index++;↵
|
16 | | | 16 | }
|