Changeset 12253 in josm
- Timestamp:
- 2017-05-25T03:01:03+02:00 (8 years ago)
- Location:
- trunk
- Files:
-
- 1 edited
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/io/remotecontrol/DNSNameFix.java
r12244 r12253 57 57 * @since 7347 58 58 */ 59 public final class DNSName extends sun.security.x509.DNSName { 59 public final class DNSNameFix extends sun.security.x509.DNSName { 60 60 61 61 private static final String alpha = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"; … … 69 69 * @throws IOException if the name is not a valid DNSName subjectAltName 70 70 */ 71 public DNSName(String name) throws IOException { 71 public DNSNameFix(String name) throws IOException { 72 72 super("fake"); 73 73 if (name == null || name.isEmpty()) -
trunk/src/org/openstreetmap/josm/io/remotecontrol/RemoteControlHttpsServer.java
r11620 r12253 119 119 switch (t.toLowerCase(Locale.ENGLISH)) { 120 120 case "uri": gn = new URIName(v); break; 121 case "dns": gn = new DNSName(v); break; 121 case "dns": gn = new DNSNameFix(v); break; 122 122 case "ip": gn = new IPAddressName(v); break; 123 123 default: gn = new OIDName(v); -
trunk/test/unit/org/openstreetmap/josm/io/remotecontrol/DNSNameFixTest.java
r12244 r12253 9 9 10 10 /** 11 * Unit tests of {@link DNSName} class. 11 * Unit tests of {@link DNSNameFix} class. 12 12 */ 13 public class DNSNameTest { 13 public class DNSNameFixTest { 14 14 15 15 /** 16 * Unit test of {@link DNSName #DNSName} - null check.16 * Unit test of {@link DNSNameFix#DNSNameFix} - null check. 17 17 * @throws IOException always (expected with null name) 18 18 */ 19 19 @Test(expected = IOException.class) 20 20 public void testDNSNameNull() throws IOException { 21 new DNSName(null); 21 new DNSNameFix(null); 22 22 } 23 23 24 24 /** 25 * Unit test of {@link DNSName #DNSName} - nominal cases.25 * Unit test of {@link DNSNameFix#DNSNameFix} - nominal cases. 26 26 * @throws IOException never 27 27 */ 28 28 @Test 29 29 public void testDNSNameNominal() throws IOException { 30 assertEquals("localhost", new DNSName("localhost").getName()); 31 assertEquals("127.0.0.1", new DNSName("127.0.0.1").getName()); 30 assertEquals("localhost", new DNSNameFix("localhost").getName()); 31 assertEquals("127.0.0.1", new DNSNameFix("127.0.0.1").getName()); 32 32 } 33 33 }
Note:
See TracChangeset
for help on using the changeset viewer.