RFR [16/java.xml] 8250638: Address reliance on default constructors in java.xml

Lance Andersen LANCE.ANDERSEN at ORACLE.COM
Thu Jul 30 16:33:31 UTC 2020


+1

> On Jul 30, 2020, at 12:20 PM, Joe Wang <huizhe.wang at oracle.com> wrote:
> 
> Hello,
> 
> Please review a change to remove reliance of default constructors in java.xml.
> 
> JBS: https://bugs.openjdk.java.net/browse/JDK-8250638
> CSR: https://bugs.openjdk.java.net/browse/JDK-8250800
> 
> Patch:
> 
> diff --git a/src/java.xml/share/classes/org/xml/sax/HandlerBase.java b/src/java.xml/share/classes/org/xml/sax/HandlerBase.java
> --- a/src/java.xml/share/classes/org/xml/sax/HandlerBase.java
> +++ b/src/java.xml/share/classes/org/xml/sax/HandlerBase.java
> @@ -1,5 +1,5 @@
>  /*
> - * Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.
> + * Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved.
>   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
>   *
>   * This code is free software; you can redistribute it and/or modify it
> @@ -58,7 +58,10 @@
>  public class HandlerBase
>      implements EntityResolver, DTDHandler, DocumentHandler, ErrorHandler
>  {
> -
> +    /**
> +     * Constructs a {@code HandlerBase}.
> +     */
> +    public HandlerBase() {}
> 
> ////////////////////////////////////////////////////////////////////
>      // Default implementation of the EntityResolver interface.
> diff --git a/src/java.xml/share/classes/org/xml/sax/helpers/DefaultHandler.java b/src/java.xml/share/classes/org/xml/sax/helpers/DefaultHandler.java
> --- a/src/java.xml/share/classes/org/xml/sax/helpers/DefaultHandler.java
> +++ b/src/java.xml/share/classes/org/xml/sax/helpers/DefaultHandler.java
> @@ -1,5 +1,5 @@
>  /*
> - * Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.
> + * Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved.
>   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
>   *
>   * This code is free software; you can redistribute it and/or modify it
> @@ -70,7 +70,10 @@
>  public class DefaultHandler
>      implements EntityResolver, DTDHandler, ContentHandler, ErrorHandler
>  {
> -
> +    /**
> +     * Constructs a {@code DefaultHandler}.
> +     */
> +    public DefaultHandler() {}
> 
> ////////////////////////////////////////////////////////////////////
>      // Default implementation of the EntityResolver interface.
> 
> Thanks,
> Joe
> 


Best
Lance
------------------




Lance Andersen| Principal Member of Technical Staff | +1.781.442.2037
Oracle Java Engineering 
1 Network Drive 
Burlington, MA 01803
Lance.Andersen at oracle.com






More information about the core-libs-dev mailing list