File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed
src/java.base/share/classes/java/net Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -2207,7 +2207,6 @@ private static URI resolve(URI base, URI child) {
22072207 ru .authority = child .authority ;
22082208 ru .host = child .host ;
22092209 ru .userInfo = child .userInfo ;
2210- ru .host = child .host ;
22112210 ru .port = child .port ;
22122211 ru .path = child .path ;
22132212 }
@@ -3490,14 +3489,12 @@ private int parseHostname(int start, int n)
34903489 if (q <= p )
34913490 break ;
34923491 l = p ;
3492+ p = q ;
3493+ q = scan (p , n , L_ALPHANUM | L_DASH , H_ALPHANUM | H_DASH );
34933494 if (q > p ) {
3495+ if (input .charAt (q - 1 ) == '-' )
3496+ fail ("Illegal character in hostname" , q - 1 );
34943497 p = q ;
3495- q = scan (p , n , L_ALPHANUM | L_DASH , H_ALPHANUM | H_DASH );
3496- if (q > p ) {
3497- if (input .charAt (q - 1 ) == '-' )
3498- fail ("Illegal character in hostname" , q - 1 );
3499- p = q ;
3500- }
35013498 }
35023499 q = scan (p , n , '.' );
35033500 if (q <= p )
You can’t perform that action at this time.
0 commit comments