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

Public method javax.swing.JMenu.setComponentOrientation() has no spec

    XMLWordPrintable

    Details

    • Type: CSR
    • Status: Closed
    • Priority: P3
    • Resolution: Approved
    • Fix Version/s: 17
    • Component/s: client-libs
    • Labels:
      None
    • Subcomponent:
    • Compatibility Kind:
      behavioral
    • Compatibility Risk:
      minimal
    • Compatibility Risk Description:
      No behavior change - specification only so minimal risk
    • Interface Kind:
      Java API
    • Scope:
      SE

      Description

      Summary

      The public method javax.swing.JMenu.setComponentOrientation() has no spec which needs to be rectified

      Problem

      javax.swing.JMenu.setComponentOrientation() does not have any spec. It used to show the spec in jdk7, jdk8, jdk9.

      It seems starting in JDK 10, the default behavior of the standard doclet via javadoc tool was changed so that if a method is just being overridden for implementation reasons, and there is no change in the public spec or signature, then the method will not be listed in the main part of the summary table and corresponding details section.

      So, that is the reason the spec for this method does not show up from jdk10 onwards and even if use @inheritDoc it will not show any spec wording.

      Solution

      Update the method spec instead of relying on method of its super class to get its spec.

      Specification

      +    /**
      +     * Sets the orientation for this menu and its associated popup menu
      +     * determined by the {@code ComponentOrientation} argument.
      +     *
      +     * @param o the new orientation for this menu and
      +     *          its associated popup menu.
      +     */
           public void setComponentOrientation(ComponentOrientation o) {

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              psadhukhan Prasanta Sadhukhan
              Reporter:
              dbessono Dmitry Bessonov
              Reviewed By:
              Alexey Ivanov
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: