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

Error in Javadoc for doAccessibleAction API in AccessibleJSlider class

    XMLWordPrintable

    Details

    • Type: CSR
    • Status: Closed
    • Priority: P3
    • Resolution: Approved
    • Fix Version/s: 17
    • Component/s: client-libs
    • Labels:
      None
    • Subcomponent:
    • Compatibility Risk:
      low
    • Compatibility Risk Description:
      No significant risk
    • Interface Kind:
      Java API
    • Scope:
      SE

      Description

      Summary

      Change the doAccessibleAction API javadoc in AccessibleJSlider class to denote that it can return true or false depending upon whether the Action was performed by the API or not.

      Problem

      The AccessibleJSlider class was changed under JDK-8264592 and few new APIs were added to it to make the class more consistent with the AccessibleJSpinner class. The doAccessibleAction is one of these APIs. The doAccessibleAction API javadoc says that the API always returns true. But the API can actually return both true or false depending upon whether the Action was performed by the API or not. The javadoc is being corrected to specify this.

      Solution

      Update the doAccessibleAction API javadoc to specify that API can return both true or false depending upon whether the Action was performed or not. This makes the API javadoc in consistent with the same API javadoc inside the AccessibleJSpinner class.

      Specification

      Following is the only change being done.

      src/java.desktop/share/classes/javax/swing/JSlider.java

                * @param i zero-based index of actions. The first action
                * (index 0) is AccessibleAction.INCREMENT and the second
                * action (index 1) is AccessibleAction.DECREMENT.
      -         * @return true.
      +         * @return true if the action was performed, otherwise false
                * @see #getAccessibleActionCount
                */
               public boolean doAccessibleAction(int i) {

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              pbansal Pankaj Bansal (Inactive)
              Reporter:
              pbansal Pankaj Bansal (Inactive)
              Reviewed By:
              Jayathirth D V
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: