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

Update the specification in the newly added constructors

    XMLWordPrintable

    Details

    • Type: CSR
    • Status: Closed
    • Priority: P4
    • Resolution: Approved
    • Fix Version/s: 16
    • Component/s: client-libs
    • Labels:
      None
    • Subcomponent:
    • Compatibility Risk:
      minimal
    • Interface Kind:
      Java API
    • Scope:
      SE

      Description

      Summary

      Looks like different people use a different style for the new constructors, it will be good to unify them.

      Problem

      1. The text "Constructor for subclasses to call." should be used in the protected constructors in the abstract classes.
      2. In all other cases the text "Constructs an {@code ClassName}." should be used.

      Solution

      Unify the new specification.

      Specification

      src/java.desktop/share/classes/javax/swing/Box.java
      
       protected class AccessibleBoxFiller extends AccessibleAWTComponent {
                   /**
      -             * Constructor for subclasses to call.
      +             * Constructs an {@code AccessibleBoxFiller}.
                    */
                   protected AccessibleBoxFiller() {}
      
       protected class AccessibleBox extends AccessibleAWTContainer {
               /**
      -         * Constructor for subclasses to call.
      +         * Constructs an {@code AccessibleBox}.
                */
               protected AccessibleBox() {}
      
      
      src/java.desktop/share/classes/javax/swing/CellRendererPane.java
      
       protected class AccessibleCellRendererPane extends AccessibleAWTContainer {
               /**
      -         * Constructor for subclasses to call.
      +         * Constructs an {@code AccessibleCellRendererPane}.
                */
               protected AccessibleCellRendererPane() {}
      
      
      src/java.desktop/share/classes/javax/swing/DefaultCellEditor.java
      
               /**
      -         * Constructor for subclasses to call.
      +         * Constructs an {@code EditorDelegate}.
                */
               protected EditorDelegate() {}
      
      
      src/java.desktop/share/classes/javax/swing/ImageIcon.java
      
               /**
      -         * Constructor for subclasses to call.
      +         * Constructs an {@code AccessibleImageIcon}.
                */
               protected AccessibleImageIcon() {}
      
      
      src/java.desktop/share/classes/javax/swing/JApplet.java
      
       protected class AccessibleJApplet extends AccessibleApplet {
               /**
      -         * Constructor for subclasses to call.
      +         * Constructs an {@code AccessibleJApplet}.
                */
               protected AccessibleJApplet() {}
      
      
      src/java.desktop/share/classes/javax/swing/JButton.java
      
       protected class AccessibleJButton extends AccessibleAbstractButton {
      
               /**
      -         * Constructor for subclasses to call.
      +         * Constructs an {@code AccessibleJButton}.
                */
               protected AccessibleJButton() {}
      
      
      src/java.desktop/share/classes/javax/swing/JCheckBox.java
      
       protected class AccessibleJCheckBox extends AccessibleJToggleButton {
      
               /**
      -         * Constructor for subclasses to call.
      +         * Constructs an {@code AccessibleJCheckBox}.
                */
               protected AccessibleJCheckBox() {}
      
      
      src/java.desktop/share/classes/javax/swing/JCheckBoxMenuItem.java
      
       protected class AccessibleJCheckBoxMenuItem extends AccessibleJMenuItem {
               /**
      -         * Constructor for subclasses to call.
      +         * Constructs an {@code AccessibleJCheckBoxMenuItem}.
                */
               protected AccessibleJCheckBoxMenuItem() {}
      
      
      src/java.desktop/share/classes/javax/swing/JColorChooser.java
      
           protected class AccessibleJColorChooser extends AccessibleJComponent {
      
               /**
      -         * Constructor for subclasses to call.
      +         * Constructs an {@code AccessibleJColorChooser}.
                */
               protected AccessibleJColorChooser() {}
      
      
      src/java.desktop/share/classes/javax/swing/JComponent.java
      
               protected class AccessibleContainerHandler
                   implements ContainerListener {
                   /**
      -             * Constructor for subclasses to call.
      +             * Constructs an {@code AccessibleContainerHandler}.
                    */
                   protected AccessibleContainerHandler() {}
      
               protected class AccessibleFocusHandler implements FocusListener {
                  /**
      -            * Constructor for subclasses to call.
      +            * Constructs an {@code AccessibleFocusHandler}.
                   */
                  protected AccessibleFocusHandler() {}
      
      src/java.desktop/share/classes/javax/swing/JDesktopPane.java
      
           protected class AccessibleJDesktopPane extends AccessibleJComponent {
      
               /**
      -         * Constructor for subclasses to call.
      +         * Constructs an {@code AccessibleJDesktopPane}.
                */
               protected AccessibleJDesktopPane() {}
      
      
      src/java.desktop/share/classes/javax/swing/JDialog.java
      
           protected class AccessibleJDialog extends AccessibleAWTDialog {
      
               /**
      -         * Constructor for subclasses to call.
      +         * Constructs an {@code AccessibleJDialog}.
                */
               protected AccessibleJDialog() {}
      
      
      src/java.desktop/share/classes/javax/swing/JEditorPane.java
      
           protected class AccessibleJEditorPane extends AccessibleJTextComponent {
      
               /**
      -         * Constructor for subclasses to call.
      +         * Constructs an {@code AccessibleJEditorPane}.
                */
               protected AccessibleJEditorPane() {}
      
      
      src/java.desktop/share/classes/javax/swing/JFileChooser.java
      
           protected class AccessibleJFileChooser extends AccessibleJComponent {
      
               /**
      -         * Constructor for subclasses to call.
      +         * Constructs an {@code AccessibleJFileChooser}.
                */
               protected AccessibleJFileChooser() {}
      
      src/java.desktop/share/classes/javax/swing/JFrame.java
      
           protected class AccessibleJFrame extends AccessibleAWTFrame {
      
               /**
      -         * Constructor for subclasses to call.
      +         * Constructs an {@code AccessibleJFrame}.
                */
               protected AccessibleJFrame() {}
      
      
      src/java.desktop/share/classes/javax/swing/JInternalFrame.java
      
               /**
      -         * Constructor for subclasses to call.
      +         * Constructs an {@code AccessibleJInternalFrame}.
                */
               protected AccessibleJInternalFrame() {}
      
                   /**
      -             * Constructor for subclasses to call.
      +             * Constructs an {@code AccessibleJDesktopIcon}.
                    */
                   protected AccessibleJDesktopIcon() {}
      
      
      src/java.desktop/share/classes/javax/swing/JLabel.java
      
               /**
      -         * Constructor for subclasses to call.
      +         * Constructs an {@code AccessibleJLabel}.
                */
               protected AccessibleJLabel() {}
      
      
      src/java.desktop/share/classes/javax/swing/JLayeredPane.java
      
           protected class AccessibleJLayeredPane extends AccessibleJComponent {
      
               /**
      -         * Constructor for subclasses to call.
      +         * Constructs an {@code AccessibleJLayeredPane}.
                */
               protected AccessibleJLayeredPane() {}
      
      
      src/java.desktop/share/classes/javax/swing/JMenu.java
      
               /**
      -         * Constructor for subclasses to call.
      +         * Constructs an {@code AccessibleJMenu}.
                */
               protected AccessibleJMenu() {}
      
      
      src/java.desktop/share/classes/javax/swing/JMenuBar.java
      
               /**
      -         * Constructor for subclasses to call.
      +         * Constructs an {@code AccessibleJMenuBar}.
                */
               protected AccessibleJMenuBar() {}
      
      
      src/java.desktop/share/classes/javax/swing/JOptionPane.java
      
           protected class AccessibleJOptionPane extends AccessibleJComponent {
      
               /**
      -         * Constructor for subclasses to call.
      +         * Constructs an {@code AccessibleJOptionPane}.
                */
               protected AccessibleJOptionPane() {}
      
      
      src/java.desktop/share/classes/javax/swing/JPanel.java
      
           protected class AccessibleJPanel extends AccessibleJComponent {
               /**
      -         * Constructor for subclasses to call.
      +         * Constructs an {@code AccessibleJPanel}.
                */
               protected AccessibleJPanel() {}
      
      
      src/java.desktop/share/classes/javax/swing/JPasswordField.java
      
           protected class AccessibleJPasswordField extends AccessibleJTextField {
      
               /**
      -         * Constructor for subclasses to call.
      +         * Constructs an {@code AccessibleJPasswordField}.
                */
               protected AccessibleJPasswordField() {}
      
      
      src/java.desktop/share/classes/javax/swing/JProgressBar.java
      
               /**
      -         * Constructor for subclasses to call.
      +         * Constructs an {@code AccessibleJProgressBar}.
                */
               protected AccessibleJProgressBar() {}
      
      
      src/java.desktop/share/classes/javax/swing/JRadioButton.java
      
           protected class AccessibleJRadioButton extends AccessibleJToggleButton {
      
               /**
      -         * Constructor for subclasses to call.
      +         * Constructs an {@code AccessibleJRadioButton}.
                */
               protected AccessibleJRadioButton() {}
      
      
      src/java.desktop/share/classes/javax/swing/JRadioButtonMenuItem.java
      
           protected class AccessibleJRadioButtonMenuItem extends AccessibleJMenuItem {
               /**
      -         * Constructor for subclasses to call.
      +         * Constructs an {@code AccessibleJRadioButtonMenuItem}.
                */
               protected AccessibleJRadioButtonMenuItem() {}
      
      
      src/java.desktop/share/classes/javax/swing/JRootPane.java
      
       protected class RootLayout implements LayoutManager2, Serializable
           {
               /**
      -         * Constructor for subclasses to call.
      +         * Constructs a {@code RootLayout}.
                */
               protected RootLayout() {}
      
       protected class AccessibleJRootPane extends AccessibleJComponent {
               /**
      -         * Constructor for subclasses to call.
      +         * Constructs an {@code AccessibleJRootPane}.
                */
               protected AccessibleJRootPane() {}
      
      
      src/java.desktop/share/classes/javax/swing/JScrollBar.java
      
               /**
      -         * Constructor for subclasses to call.
      +         * Constructs an {@code AccessibleJScrollBar}.
                */
               protected AccessibleJScrollBar() {}
      
      
      src/java.desktop/share/classes/javax/swing/JSeparator.java
      
           protected class AccessibleJSeparator extends AccessibleJComponent {
      
               /**
      -         * Constructor for subclasses to call.
      +         * Constructs an {@code AccessibleJSeparator}.
                */
               protected AccessibleJSeparator() {}
      
      
      src/java.desktop/share/classes/javax/swing/JSplitPane.java
      
       protected class AccessibleJSplitPane extends AccessibleJComponent
               implements AccessibleValue {
               /**
      -         * Constructor for subclasses to call.
      +         * Constructs an {@code AccessibleJSplitPane}.
                */
               protected AccessibleJSplitPane() {}
      
      
      src/java.desktop/share/classes/javax/swing/JTabbedPane.java
      
       protected class ModelListener implements ChangeListener, Serializable {
               /**
      -         * Constructor for subclasses to call.
      +         * Constructs a {@code ModelListener}.
                */
               protected ModelListener() {}
      
      
      src/java.desktop/share/classes/javax/swing/JTextArea.java
      
       protected class AccessibleJTextArea extends AccessibleJTextComponent {
      
               /**
      -         * Constructor for subclasses to call.
      +         * Constructs an {@code AccessibleJTextArea}.
                */
               protected AccessibleJTextArea() {}
      
      
      src/java.desktop/share/classes/javax/swing/JTextField.java
      
       protected class AccessibleJTextField extends AccessibleJTextComponent {
      
               /**
      -         * Constructor for subclasses to call.
      +         * Constructs an {@code AccessibleJTextField}.
                */
               protected AccessibleJTextField() {}
      
      
      src/java.desktop/share/classes/javax/swing/JToolBar.java
      
       protected class AccessibleJToolBar extends AccessibleJComponent {
      
               /**
      -         * Constructor for subclasses to call.
      +         * Constructs an {@code AccessibleJToolBar}.
                */
               protected AccessibleJToolBar() {}
      
      
      src/java.desktop/share/classes/javax/swing/JToolTip.java
      
       protected class AccessibleJToolTip extends AccessibleJComponent {
      
               /**
      -         * Constructor for subclasses to call.
      +         * Constructs an {@code AccessibleJToolTip}.
                */
               protected AccessibleJToolTip() {}
      
      
      src/java.desktop/share/classes/javax/swing/JTree.java
      
               /**
      -         * Constructor for subclasses to call.
      +         * Constructs an {@code EmptySelectionModel}.
                */
               protected EmptySelectionModel() {}
      
               /**
      -         * Constructor for subclasses to call.
      +         * Constructs a {@code TreeSelectionRedirector}.
                */
               protected TreeSelectionRedirector() {}
      
       protected class TreeModelHandler implements TreeModelListener {
      -         /**
      -          * Constructor for subclasses to call.
      -          */
      -         protected TreeModelHandler() {}
      +
      +        /**
      +         * Constructs a {@code TreeModelHandler}.
      +         */
      +        protected TreeModelHandler() {}
      
      
      src/java.desktop/share/classes/javax/swing/JViewport.java
      
       protected class ViewListener extends ComponentAdapter implements Serializable
           {
               /**
      -         * Constructor for subclasses to call.
      +         * Constructs a {@code ViewListener}.
                */
               protected ViewListener() {}
      
       protected class AccessibleJViewport extends AccessibleJComponent {
      
               /**
      -         * Constructor for subclasses to call.
      +         * Constructs an {@code AccessibleJViewport}.
                */
               protected AccessibleJViewport() {}
      
      
      src/java.desktop/share/classes/javax/swing/JWindow.java
      
       protected class AccessibleJWindow extends AccessibleAWTWindow {
               // everything is in the new parent, AccessibleAWTWindow
               /**
      -         * Constructor for subclasses to call.
      +         * Constructs an {@code AccessibleJWindow}.
                */
               protected AccessibleJWindow() {}
           }
      
      
      src/java.desktop/share/classes/javax/swing/ToolTipManager.java
      
       protected class insideTimerAction implements ActionListener {
               /**
      -         * Constructor for subclasses to call.
      +         * Constructs an {@code insideTimerAction}.
                */
               protected insideTimerAction() {}
      
       protected class outsideTimerAction implements ActionListener {
               /**
      -         * Constructor for subclasses to call.
      +         * Constructs an {@code outsideTimerAction}.
                */
               protected outsideTimerAction() {}
      
       protected class stillInsideTimerAction implements ActionListener {
               /**
      -         * Constructor for subclasses to call.
      +         * Constructs a {@code stillInsideTimerAction}.
                */
               protected stillInsideTimerAction() {}
      
      
      src/java.desktop/share/classes/javax/swing/table/JTableHeader.java
      
       protected class AccessibleJTableHeader extends AccessibleJComponent {
      
               /**
      -         * Constructor for subclasses to call.
      +         * Constructs an {@code AccessibleJTableHeader}.
                */
               protected AccessibleJTableHeader() {}
      
      
      src/java.desktop/share/classes/javax/swing/text/html/FormView.java
      
       protected class MouseEventListener extends MouseAdapter {
      
               /**
      -         * Constructor for subclasses to call.
      +         * Constructs a {@code MouseEventListener}.
                */
               protected MouseEventListener() {}
      
      
      src/java.desktop/share/classes/javax/sound/midi/spi/MidiDeviceProvider.java
      
       public abstract class MidiDeviceProvider {
      
           /**
      -     * Constructs a {@code MidiDeviceProvider}.
      +     * Constructor for subclasses to call.
            */
           protected MidiDeviceProvider() {}
      
      src/java.desktop/share/classes/javax/sound/midi/spi/MidiFileReader.java
      
       public abstract class MidiFileReader {
      
           /**
      -     * Constructs a {@code MidiFileReader}.
      +     * Constructor for subclasses to call.
            */
           protected MidiFileReader() {}
      
      
      src/java.desktop/share/classes/javax/sound/midi/spi/MidiFileWriter.java
      
       public abstract class MidiFileWriter {
      
           /**
      -     * Constructs a {@code MidiFileWriter}.
      +     * Constructor for subclasses to call.
            */
           protected MidiFileWriter() {}
      
      
      src/java.desktop/share/classes/javax/sound/midi/spi/SoundbankReader.java
      
       public abstract class SoundbankReader {
      
           /**
      -     * Constructs a {@code SoundbankReader}.
      +     * Constructor for subclasses to call.
            */
           protected SoundbankReader() {}
      
      
      src/java.desktop/share/classes/javax/sound/sampled/spi/AudioFileReader.java
      
       public abstract class AudioFileReader {
      
           /**
      -     * Constructs an {@code AudioFileReader}.
      +     * Constructor for subclasses to call.
            */
           protected AudioFileReader() {}
      
      
      src/java.desktop/share/classes/javax/sound/sampled/spi/AudioFileWriter.java
      
       public abstract class AudioFileWriter {
      
           /**
      -     * Constructs an {@code AudioFileWriter}.
      +     * Constructor for subclasses to call.
            */
           protected AudioFileWriter() {}
      
      
      src/java.desktop/share/classes/javax/sound/sampled/spi/FormatConversionProvider.java
      
       public abstract class FormatConversionProvider {
      
           /**
      -     * Constructs a {@code FormatConversionProvider}.
      +     * Constructor for subclasses to call.
            */
           protected FormatConversionProvider() {}
      
      
      src/java.desktop/share/classes/javax/sound/sampled/spi/MixerProvider.java
      
       public abstract class MixerProvider {
      
           /**
      -     * Constructs a {@code MixerProvider}.
      +     * Constructor for subclasses to call.
            */
           protected MixerProvider() {}

      Link for convenience: https://openjdk.github.io/cr/?repo=jdk&pr=315&range=00

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              serb Sergey Bylokhov
              Reporter:
              serb Sergey Bylokhov
              Reviewed By:
              Philip Race
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: