src/share/classes/java/util/logging/ConsoleHandler.java

Print this page

        

@@ -94,14 +94,14 @@
      * The <tt>ConsoleHandler</tt> is configured based on
      * <tt>LogManager</tt> properties (or their default values).
      *
      */
     public ConsoleHandler() {
-        sealed = false;
+        doWithControlPermission(() -> {
         configure();
         setOutputStream(System.err);
-        sealed = true;
+        });
     }
 
     /**
      * Publish a <tt>LogRecord</tt>.
      * <p>