JDK 16 RFR of JDK-8250221: Address use of default constructors in java.logging

Daniel Fuchs daniel.fuchs at oracle.com
Thu Jul 23 18:52:23 UTC 2020


Hi Joe,

LGTM.

best regards,

-- daniel

On 23/07/2020 18:37, Joe Darcy wrote:
> Hello,
> 
> Please review the changes for
> 
>      JDK-8250221: Address use of default constructors in java.logging
>      webrev: http://cr.openjdk.java.net/~darcy/8250221.0/
>      CSR: https://bugs.openjdk.java.net/browse/JDK-8250223
> 
> This is part of a larger effort to remove reliance of default 
> constructors in the JDK's exported API in preparation for introduction 
> of a lint warning for this situation.
> 
> Patch below; I'll update copyright years as needed before a push.
> 
> Thanks,
> 
> -Joe
> 
> --- 
> old/src/java.logging/share/classes/java/util/logging/ErrorManager.java 
> 2020-07-23 10:30:58.570574191 -0700
> +++ 
> new/src/java.logging/share/classes/java/util/logging/ErrorManager.java 
> 2020-07-23 10:30:58.126574191 -0700
> @@ -39,6 +39,11 @@
>   public class ErrorManager {
>      private boolean reported = false;
> 
> +    /**
> +     * Create an {@code ErrorManager}.
> +     */
> +    public ErrorManager() {}
> +
>       /*
>        * We declare standard error codes for important categories of 
> errors.
>        */
> --- 
> old/src/java.logging/share/classes/java/util/logging/SimpleFormatter.java 2020-07-23 
> 10:30:59.390574191 -0700
> +++ 
> new/src/java.logging/share/classes/java/util/logging/SimpleFormatter.java 2020-07-23 
> 10:30:58.942574191 -0700
> @@ -66,6 +66,11 @@
> SurrogateLogger.getSimpleFormat(SimpleFormatter::getLoggingProperty);
> 
>       /**
> +     * Create a {@code SimpleFormatter}.
> +     */
> +    public SimpleFormatter() {}
> +
> +    /**
>        * Format the given LogRecord.
>        * <p>
>        * The formatting can be customized by specifying the format string
> 



More information about the core-libs-dev mailing list