Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8250579

Address reliance on default constructors in javax.sql

XMLWordPrintable

    • Icon: CSR CSR
    • Resolution: Approved
    • Icon: P4 P4
    • 16
    • core-libs
    • None
    • minimal
    • Java API
    • SE

      Summary

      Replace a default constructor in javax.sql.rowset.RowSetMetaDataImpl with an equivalent explicit constructor.

      Problem

      The class javax.sql.rowset.RowSetMetaDataImpl relies on a default constructor.

      Solution

      Add an explicit public no-arg constructor.

      Specification

      diff -r b3af0bdfb85a src/java.sql.rowset/share/classes/javax/sql/rowset/RowSetMetaDataImpl.java
      --- a/src/java.sql.rowset/share/classes/javax/sql/rowset/RowSetMetaDataImpl.java    Fri Jul 24 13:49:38 2020 -0700
      +++ b/src/java.sql.rowset/share/classes/javax/sql/rowset/RowSetMetaDataImpl.java    Fri Jul 24 19:13:28 2020 -0700
      @@ -52,6 +52,10 @@
        * @since 1.5
        */
       public class RowSetMetaDataImpl implements RowSetMetaData,  Serializable {
      +    /**
      +     * Constructs a {@code RowSetMetaDataImpl} object.
      +     */
      +    public RowSetMetaDataImpl() {}
      
           /**
            * The number of columns in the <code>RowSet</code> object that created

            darcy Joe Darcy
            darcy Joe Darcy
            Lance Andersen
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: