Code review request, 8020842 IDN do not throw IAE when hostname ends with a trailing dot

Weijun Wang weijun.wang at oracle.com
Sun Aug 11 20:15:13 PDT 2013


>    if (q < input.length()) {   // Ah, a dot!
>      out.append('.');
>    }
>    p = q + 1;

Using

   if (q != input.length())

should be even better. The searchDots method clearly specifies that "or 
if there is no dots, return the length of input string".

--Max



More information about the net-dev mailing list