--- old/src/share/classes/java/util/logging/SocketHandler.java 2013-12-08 19:34:48.810978554 +0100 +++ new/src/share/classes/java/util/logging/SocketHandler.java 2013-12-08 19:34:48.688980708 +0100 @@ -118,16 +118,19 @@ */ public SocketHandler() throws IOException { // We are going to use the logging defaults. - sealed = false; - configure(); - try { - connect(); - } catch (IOException ix) { + doWithControlPermission(() -> { + configure(); + try { + connect(); + } catch (IOException ioe) { + throw new UncheckedIOException(ioe); + } + }); + } catch (UncheckedIOException uioe) { System.err.println("SocketHandler: connect failed to " + host + ":" + port); - throw ix; + throw uioe.getCause(); } - sealed = true; } /** @@ -146,9 +149,7 @@ * host and port. */ public SocketHandler(String host, int port) throws IOException { - sealed = false; - configure(); - sealed = true; + doWithControlPermission(this::configure); this.port = port; this.host = host; connect();