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

AWT Accessibility API nested classes rely on default constructors

XMLWordPrintable

    • Icon: CSR CSR
    • Resolution: Approved
    • Icon: P4 P4
    • 16
    • client-libs
    • None
    • source, binary
    • minimal
    • These should all be the same as the default constructors
    • Java API
    • SE

      Summary

      Address reliance on default constructors for nested accessibility classes of AWT components.

      Problem

      The nested accessibility related classes of AWT components rely on the use of implicit Default Constructors. This is unsuitable as certain access modifiers are required for some constructors and API descriptions but are not included with the use of implicit Default Constructors. The use of explicitly defined no-arg constructors is required.

      Solution

      Add explicit no-args constructors to all these classes.

      Specification

      src/java.desktop/share/classes/java/applet/Applet.java

          protected class AccessibleApplet :
      +        /**
      +         * Constructs an {@code AccessibleApplet}
      +         */
      +        protected AccessibleApplet() {}
      
      

      src/java.desktop/share/classes/java/awt/Button.java

          protected class AccessibleButton :
      +        /**
      +         * Constructs an {@code AccessibleAWTButton}
      +         */
      +        protected AccessibleAWTButton() {}
      

      src/java.desktop/share/classes/java/awt/Canvas.java

          protected class AccessibleCanvas :
      +        /**
      +         * Constructs an {@code AccessibleAWTCanvas}
      +         */
      +        protected AccessibleAWTCanvas() {}
      

      src/java.desktop/share/classes/java/awt/CheckboxMenuItem.java

          protected class AccessibleCheckboxMenuItem :
      +        /**
      +         * Constructs an {@code AccessibleAWTCheckboxMenuItem}
      +         */
      +        protected AccessibleAWTCheckboxMenuItem() {}
      

      src/java.desktop/share/classes/java/awt/Component.java

          protected class AccessibleAWTComponent.AccessibleAWTComponentHandler :
      +            /**
      +             * Constructs an {@code AccessibleAWTComponentHandler}
      +             */
      +            protected AccessibleAWTComponentHandler() {}
      
      +            /**
      +             * Constructs an {@code AccessibleAWTFocusHandler}
      +             */
      +            protected AccessibleAWTFocusHandler() {}
      

      src/java.desktop/share/classes/java/awt/Container.java

          protected class AccessibleAWTContainer :
      +        /**
      +         * Constructs an {@code AccessibleAWTContainer}
      +         */
      +        protected AccessibleAWTContainer() {}
      
          protected class AccessibleAWTContainer.AccessibleContainerHandler :
      +            /**
      +             * Constructs an {@code AccessibleContainerHandler}
      +             */
      +            protected AccessibleContainerHandler() {}
      

      src/java.desktop/share/classes/java/awt/Dialog.java

          protected class AccessibleAWTDialog :
      +        /**
      +         * Constructs an {@code AccessibleAWTDialog}
      +         */
      +        protected AccessibleAWTDialog() {}
      

      src/java.desktop/share/classes/java/awt/Frame.java

          protected class AccessibleAWTFrame :
      +        /**
      +         * Constructs an {@code AccessibleAWTFrame}
      +         */
      +        protected AccessibleAWTFrame() {}
      

      src/java.desktop/share/classes/java/awt/Menu.java

          protected class AccessibleAWTMenu :
      +        /**
      +         * Constructs an {@code AccessibleAWTMenu}
      +         */
      +        protected AccessibleAWTMenu() {}
      

      src/java.desktop/share/classes/java/awt/MenuBar.java

          protected class AccessibleAWTMenuBar :
      +        /**
      +         * Constructs an {@code AccessibleAWTMenuBar}
      +         */
      +        protected AccessibleAWTMenuBar() {}
      

      src/java.desktop/share/classes/java/awt/MenuItem.java

          protected class AccessibleAWTMenuItem :
      +        /**
      +         * Constructs an {@code AccessibleAWTMenuItem}
      +         */
      +        protected AccessibleAWTMenuItem() {}
      

      src/java.desktop/share/classes/java/awt/Panel.java

          protected class AccessibleAWTPanel :
      +        /**
      +         * Constructs an {@code AccessibleAWTPanel}
      +         */
      +        protected AccessibleAWTPanel() {}
      

      src/java.desktop/share/classes/java/awt/PopupMenu.java

          protected class AccessibleAWTPanel :
      +        /**
      +         * Constructs an {@code AccessibleAWTPopupMenu}
      +         */
      +        protected AccessibleAWTPopupMenu() {}
      

      src/java.desktop/share/classes/java/awt/ScrollPane.java

          protected class AccessibleAWTScrollPane :
      +        /**
      +         * Constructs an {@code AccessibleAWTScrollPane}
      +         */
      +        protected AccessibleAWTScrollPane() {}
      

      src/java.desktop/share/classes/java/awt/Scrollbar.java

          protected class AccessibleAWTScrollBar :
      +        /**
      +         * Constructs an {@code AccessibleAWTScrollBar}
      +         */
      +        protected AccessibleAWTScrollBar() {}
      

      src/java.desktop/share/classes/java/awt/TextArea.java

          protected class AccessibleAWTTextArea :
      +        /**
      +         * Constructs an {@code AccessibleAWTTextArea}
      +         */
      +        protected AccessibleAWTTextArea() {}
      

      src/java.desktop/share/classes/java/awt/TextField.java

          protected class AccessibleAWTTextField :
      +        /**
      +         * Constructs an {@code AccessibleAWTTextField}
      +         */
      +        protected AccessibleAWTTextField() {}
      

      src/java.desktop/share/classes/java/awt/Window.java

          protected class AccessibleAWTWindow :
      +        /**
      +         * Constructs an {@code AccessibleAWTWindow}
      +         */
      +        protected AccessibleAWTWindow() {}
      

            prr Philip Race
            darcy Joe Darcy
            Sergey Bylokhov
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: