-
Bug
-
Resolution: Not an Issue
-
P3
-
None
-
8
IDN.toASCII method is failing on processing input parameter with leading dots
- IllegalArgumentException: "Empty label is not a legal name".
See test example:
import java.net.IDN;
public class IDNTest {
public static void main(String[] args) {
String okString = ".";
String failString = ".abc";
try {
System.out.println(IDN.toASCII(okString)); // OK
System.out.println(IDN.toASCII(failString)); // Exception
} catch (Exception e) {
e.printStackTrace();
}
}
}
Same code was working fine in JDK7.
- IllegalArgumentException: "Empty label is not a legal name".
See test example:
import java.net.IDN;
public class IDNTest {
public static void main(String[] args) {
String okString = ".";
String failString = ".abc";
try {
System.out.println(IDN.toASCII(okString)); // OK
System.out.println(IDN.toASCII(failString)); // Exception
} catch (Exception e) {
e.printStackTrace();
}
}
}
Same code was working fine in JDK7.