Ignore:
Timestamp:
2016-07-21T01:57:41+02:00 (4 years ago)
Author:
Don-vip
Message:

see #11390 - switch to Java 8

File:
1 edited

Legend:

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

    r10308 r10580  
    4646import sun.security.x509.CertificateAlgorithmId;
    4747import sun.security.x509.CertificateExtensions;
    48 import sun.security.x509.CertificateIssuerName;
    4948import sun.security.x509.CertificateSerialNumber;
    50 import sun.security.x509.CertificateSubjectName;
    5149import sun.security.x509.CertificateValidity;
    5250import sun.security.x509.CertificateVersion;
     
    149147        info.set(X509CertInfo.VALIDITY, interval);
    150148        info.set(X509CertInfo.SERIAL_NUMBER, new CertificateSerialNumber(sn));
    151 
    152         // Change of behaviour in JDK8:
    153         // https://bugs.openjdk.java.net/browse/JDK-8040820
    154         // https://bugs.openjdk.java.net/browse/JDK-7198416
    155         if (!Main.isJava8orLater()) {
    156             // Java 7 code. To remove with Java 8 migration
    157             info.set(X509CertInfo.SUBJECT, new CertificateSubjectName(owner));
    158             info.set(X509CertInfo.ISSUER, new CertificateIssuerName(owner));
    159         } else {
    160             // Java 8 and later code
    161             info.set(X509CertInfo.SUBJECT, owner);
    162             info.set(X509CertInfo.ISSUER, owner);
    163         }
     149        info.set(X509CertInfo.SUBJECT, owner);
     150        info.set(X509CertInfo.ISSUER, owner);
    164151
    165152        info.set(X509CertInfo.KEY, new CertificateX509Key(pair.getPublic()));
Note: See TracChangeset for help on using the changeset viewer.