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

java.lang.Number has a default constructor

XMLWordPrintable

    • Icon: CSR CSR
    • Resolution: Approved
    • Icon: P4 P4
    • 13
    • core-libs
    • None
    • minimal
    • Add explicitly declared replacement to the default no-arg constructor.
    • Java API
    • SE

      Summary

      Add an explicitly declared no-arg constructor to java.lang.Number to avoid use of the default constructor.

      Problem

      Default constructors are inappropriate for well-documented APIs.

      Solution

      Add an explicit (trivial) constructor to java.lang.Number.

      Specification

       public abstract class Number implements java.io.Serializable {
           /**
      +     * Constructor for subclasses to call.
      +     */
      +    public Number() {super();}
      +
      +    /**

            darcy Joe Darcy
            darcy Joe Darcy
            Brian Burkhalter, Roger Riggs
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: