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

Weijun Wang weijun.wang at oracle.com
Mon Aug 12 03:15:13 UTC 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 security-dev mailing list