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

Address reliance on default constructors in the JDK (umbrella)

    XMLWordPrintable

Details

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

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: