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

Address reliance on default constructors in the JDK (umbrella)

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Other
    • Icon: P4 P4
    • 16
    • 16
    • core-libs
    • None

      A no-arg public constructor is generated by the compiler for a class if it does not declare an explicit constructor. While convenient, this is inappropriate for many kinds of formal classes, both because the constructor will have no javadoc and because the constructor may be unintended.

      For the JDK, classes intended to be used outside of the JDK, public classes in exported packages, should not rely on default constructors.

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

              Created:
              Updated:
              Resolved: