| Forgive me my ignorance around all the RFCs people are trying to implement, but I'm not sure it's actually a bug in IDN. The EmailValidator class passes ".com" in the second cycle of the while loop. I haven't read the RFC, but that seems like an illegal value either way. Looking around for JDK bugs around this, I only found: https://bugs.openjdk.java.net/browse/JDK-8081570 which seems to state (if i understand correctly) that ".com" would be invalid following the RFC. Also when reading through https://tools.ietf.org/html/rfc3696 I read: A DNS label may be no more than 63 octets long. This is in the form actually stored; if a non-ASCII label is converted to encoded "punycode" form (see Section 5), the length of that form may restrict the number of actual characters (in the original character set) that can be accommodated. A complete, fully-qualified, domain name must not exceed 255 octets. I'm not sure what the "stored" means. But I'm wondering if the while-loop for the domain part is actually required (> 63 octects for the domain part should be considered "incorrect"?). Also about the maximum being 63 or 64, I stumbled upon https://bugs.openjdk.java.net/browse/JDK-7169924 where they seem to think that 63 is the "correct" value. So I'm not sure where this leaves us, I hope the resources might be of some help  |