Changeset 12703 in josm for trunk/src/org/openstreetmap/josm/io
- Timestamp:
- 2017-08-31T17:52:05+02:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/io/remotecontrol/RemoteControl.java
r8510 r12703 11 11 import org.openstreetmap.josm.data.preferences.BooleanProperty; 12 12 import org.openstreetmap.josm.io.remotecontrol.handler.RequestHandler; 13 import org.openstreetmap.josm.tools.Logging; 13 14 14 15 /** … … 47 48 public static void start() { 48 49 RemoteControlHttpServer.restartRemoteControlHttpServer(); 49 RemoteControlHttpsServer.restartRemoteControlHttpsServer(); 50 if (supportsHttps()) { 51 RemoteControlHttpsServer.restartRemoteControlHttpsServer(); 52 } 50 53 } 51 54 … … 56 59 public static void stop() { 57 60 RemoteControlHttpServer.stopRemoteControlHttpServer(); 58 RemoteControlHttpsServer.stopRemoteControlHttpsServer(); 61 if (supportsHttps()) { 62 RemoteControlHttpsServer.stopRemoteControlHttpsServer(); 63 } 64 } 65 66 /** 67 * Determines if the current JVM support HTTPS remote control. 68 * @return {@code true} if the JVM provides {@code sun.security.x509} classes 69 * @since 12703 70 */ 71 public static boolean supportsHttps() { 72 try { 73 return Class.forName("sun.security.x509.GeneralName") != null; 74 } catch (ClassNotFoundException e) { 75 Logging.trace(e); 76 return false; 77 } 59 78 } 60 79
Note:
See TracChangeset
for help on using the changeset viewer.