Changeset 12253 in josm


Ignore:
Timestamp:
2017-05-25T03:01:03+02:00 (2 years ago)
Author:
Don-vip
Message:

findbugs - NM_SAME_SIMPLE_NAME_AS_SUPERCLASS

Location:
trunk
Files:
1 edited
2 moved

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/io/remotecontrol/DNSNameFix.java

    r12244 r12253  
    5757 * @since 7347
    5858 */
    59 public final class DNSName extends sun.security.x509.DNSName {
     59public final class DNSNameFix extends sun.security.x509.DNSName {
    6060
    6161    private static final String alpha = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
     
    6969     * @throws IOException if the name is not a valid DNSName subjectAltName
    7070     */
    71     public DNSName(String name) throws IOException {
     71    public DNSNameFix(String name) throws IOException {
    7272        super("fake");
    7373        if (name == null || name.isEmpty())
  • trunk/src/org/openstreetmap/josm/io/remotecontrol/RemoteControlHttpsServer.java

    r11620 r12253  
    119119        switch (t.toLowerCase(Locale.ENGLISH)) {
    120120            case "uri": gn = new URIName(v); break;
    121             case "dns": gn = new DNSName(v); break;
     121            case "dns": gn = new DNSNameFix(v); break;
    122122            case "ip": gn = new IPAddressName(v); break;
    123123            default: gn = new OIDName(v);
  • trunk/test/unit/org/openstreetmap/josm/io/remotecontrol/DNSNameFixTest.java

    r12244 r12253  
    99
    1010/**
    11  * Unit tests of {@link DNSName} class.
     11 * Unit tests of {@link DNSNameFix} class.
    1212 */
    13 public class DNSNameTest {
     13public class DNSNameFixTest {
    1414
    1515    /**
    16      * Unit test of {@link DNSName#DNSName} - null check.
     16     * Unit test of {@link DNSNameFix#DNSNameFix} - null check.
    1717     * @throws IOException always (expected with null name)
    1818     */
    1919    @Test(expected = IOException.class)
    2020    public void testDNSNameNull() throws IOException {
    21         new DNSName(null);
     21        new DNSNameFix(null);
    2222    }
    2323
    2424    /**
    25      * Unit test of {@link DNSName#DNSName} - nominal cases.
     25     * Unit test of {@link DNSNameFix#DNSNameFix} - nominal cases.
    2626     * @throws IOException never
    2727     */
    2828    @Test
    2929    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());
    3232    }
    3333}
Note: See TracChangeset for help on using the changeset viewer.