RFC 952 specifies that an LDH (Letter-Digit-Hyphen) label may only end with a letter or digit. We should remove hyphens from the set of permissible terminal characters in a label.
Also see: https://www.icann.org/en/announcements/details/comment-concerning-trailing-hyphen-domain-names-7-1-2000-en ------------- Commit messages: - 8381771: Add a check for DNSName not to end with a hyphen Changes: https://git.openjdk.org/jdk/pull/30628/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=30628&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8381771 Stats: 16 lines in 2 files changed: 8 ins; 2 del; 6 mod Patch: https://git.openjdk.org/jdk/pull/30628.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/30628/head:pull/30628 PR: https://git.openjdk.org/jdk/pull/30628
