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

SpinnerValueFactory has an implicit no-arg constructor

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • jfx15
    • jfx11, 8u40, jfx15
    • javafx

      The SpinnerValueFactory has an implicit no-arg constructor, which as a result shows up in the API docs without any documentation associated with it.

      If there are no explicitly defined constructors in a Java class, the javac compiler will generate a public, no-arg constructor for you. This is an anti-pattern for classes that are part of a library's public API. It can lead to unexpected results, such as a public constructor mistakenly being exposed, or if it was intended, it can disappear if you add another constructor without explicitly defining the public no-arg constructor at the same time.

      Additionally, the implicit constructor will have no API docs associated with it.

            aghaisas Ajit Ghaisas
            kcr Kevin Rushforth
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: