equal
deleted
inserted
replaced
70 * |
70 * |
71 * @param name the DNSName. |
71 * @param name the DNSName. |
72 * @throws IOException if the name is not a valid DNSName subjectAltName |
72 * @throws IOException if the name is not a valid DNSName subjectAltName |
73 */ |
73 */ |
74 public DNSName(String name) throws IOException { |
74 public DNSName(String name) throws IOException { |
75 if (name == null || name.length() == 0) |
75 if (name == null || name.isEmpty()) |
76 throw new IOException("DNSName must not be null or empty"); |
76 throw new IOException("DNSName must not be null or empty"); |
77 if (name.contains(" ")) |
77 if (name.contains(" ")) |
78 throw new IOException("DNSName with blank components is not permitted"); |
78 throw new IOException("DNSName with blank components is not permitted"); |
79 if (name.startsWith(".") || name.endsWith(".")) |
79 if (name.startsWith(".") || name.endsWith(".")) |
80 throw new IOException("DNSName may not begin or end with a ."); |
80 throw new IOException("DNSName may not begin or end with a ."); |