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