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

& is displayed in some Swing docs

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 11
    • 10, 11
    • client-libs

        There are cases where & is displayed directly in some Swing docs, meaning it appears as & in the generated HTML.

        There's a funny case in JPanel.java, line 130:

             * Returns the look and feel (L&F) object that renders this component.



        But more interesting, there are a number of places in @BeanProperty annotations, where `L&F` is written as `L&F` ... even though the string is a simple Java String, and not appearing in the context of a javadoc comment.

        Here's the 'grep' output for `&` in the Swing classes, in a current docs build.

        build/linux-x86_64-normal-server-release/images/docs/api/java.desktop/javax/swing/JPanel.html:<div class="block">Returns the look and feel (L&amp;amp;F) object that renders this component.</div>
        build/linux-x86_64-normal-server-release/images/docs/api/java.desktop/javax/swing/JPanel.html:<div class="block">Returns the look and feel (L&amp;amp;F) object that renders this component.</div>
        build/linux-x86_64-normal-server-release/images/docs/api/java.desktop/javax/swing/JPanel.html: <a href="../../java/beans/BeanProperty.html#description()">description</a>="A string that specifies the name of the L&amp;amp;F class.")
        build/linux-x86_64-normal-server-release/images/docs/api/java.desktop/javax/swing/JToggleButton.html: <a href="../../java/beans/BeanProperty.html#description()">description</a>="A string that specifies the name of the L&amp;amp;F class")
        build/linux-x86_64-normal-server-release/images/docs/api/java.desktop/javax/swing/plaf/class-use/PanelUI.html:<div class="block">Returns the look and feel (L&amp;amp;F) object that renders this component.</div>
        build/linux-x86_64-normal-server-release/images/docs/api/java.desktop/javax/swing/JFileChooser.html: <a href="../../java/beans/BeanProperty.html#description()">description</a>="Sets whether the approve &amp;amp; cancel buttons are shown.")
        build/linux-x86_64-normal-server-release/images/docs/api/java.desktop/javax/swing/JFileChooser.html: <a href="../../java/beans/BeanProperty.html#description()">description</a>="A string that specifies the name of the L&amp;amp;F class.")
        build/linux-x86_64-normal-server-release/images/docs/api/java.desktop/javax/swing/JSplitPane.html: <a href="../../java/beans/BeanProperty.html#description()">description</a>="The L&amp;amp;F object that renders this component.")
        build/linux-x86_64-normal-server-release/images/docs/api/java.desktop/javax/swing/JSplitPane.html: <a href="../../java/beans/BeanProperty.html#description()">description</a>="A string that specifies the name of the L&amp;amp;F class.")
        build/linux-x86_64-normal-server-release/images/docs/api/java.desktop/javax/swing/JSplitPane.html: <a href="../../java/beans/BeanProperty.html#description()">description</a>="The minimum location of the divider from the L&amp;amp;F.")
        build/linux-x86_64-normal-server-release/images/docs/api/java.desktop/javax/swing/JButton.html: <a href="../../java/beans/BeanProperty.html#description()">description</a>="A string that specifies the name of the L&amp;amp;F class.")
        build/linux-x86_64-normal-server-release/images/docs/api/java.desktop/javax/swing/JCheckBox.html: <a href="../../java/beans/BeanProperty.html#description()">description</a>="A string that specifies the name of the L&amp;amp;F class")
        build/linux-x86_64-normal-server-release/images/docs/api/java.desktop/javax/swing/JRadioButton.html: <a href="../../java/beans/BeanProperty.html#description()">description</a>="A string that specifies the name of the L&amp;amp;F class.")

        But more interesting, there are a number of places in @BeanProperty annotations, where `L&F` is written as `L&amp;F` ... even those the string is a simple Java String, and not appearing in the context of a javadoc comment.

        Here's the 'grep' output for `&amp;amp;` in the Swing classes, in a current docs build.

        build/linux-x86_64-normal-server-release/images/docs/api/java.desktop/javax/swing/JPanel.html:<div class="block">Returns the look and feel (L&amp;amp;F) object that renders this component.</div>
        build/linux-x86_64-normal-server-release/images/docs/api/java.desktop/javax/swing/JPanel.html:<div class="block">Returns the look and feel (L&amp;amp;F) object that renders this component.</div>
        build/linux-x86_64-normal-server-release/images/docs/api/java.desktop/javax/swing/JPanel.html: <a href="../../java/beans/BeanProperty.html#description()">description</a>="A string that specifies the name of the L&amp;amp;F class.")
        build/linux-x86_64-normal-server-release/images/docs/api/java.desktop/javax/swing/JToggleButton.html: <a href="../../java/beans/BeanProperty.html#description()">description</a>="A string that specifies the name of the L&amp;amp;F class")
        build/linux-x86_64-normal-server-release/images/docs/api/java.desktop/javax/swing/plaf/class-use/PanelUI.html:<div class="block">Returns the look and feel (L&amp;amp;F) object that renders this component.</div>
        build/linux-x86_64-normal-server-release/images/docs/api/java.desktop/javax/swing/JFileChooser.html: <a href="../../java/beans/BeanProperty.html#description()">description</a>="Sets whether the approve &amp;amp; cancel buttons are shown.")
        build/linux-x86_64-normal-server-release/images/docs/api/java.desktop/javax/swing/JFileChooser.html: <a href="../../java/beans/BeanProperty.html#description()">description</a>="A string that specifies the name of the L&amp;amp;F class.")
        build/linux-x86_64-normal-server-release/images/docs/api/java.desktop/javax/swing/JSplitPane.html: <a href="../../java/beans/BeanProperty.html#description()">description</a>="The L&amp;amp;F object that renders this component.")
        build/linux-x86_64-normal-server-release/images/docs/api/java.desktop/javax/swing/JSplitPane.html: <a href="../../java/beans/BeanProperty.html#description()">description</a>="A string that specifies the name of the L&amp;amp;F class.")
        build/linux-x86_64-normal-server-release/images/docs/api/java.desktop/javax/swing/JSplitPane.html: <a href="../../java/beans/BeanProperty.html#description()">description</a>="The minimum location of the divider from the L&amp;amp;F.")
        build/linux-x86_64-normal-server-release/images/docs/api/java.desktop/javax/swing/JButton.html: <a href="../../java/beans/BeanProperty.html#description()">description</a>="A string that specifies the name of the L&amp;amp;F class.")
        build/linux-x86_64-normal-server-release/images/docs/api/java.desktop/javax/swing/JCheckBox.html: <a href="../../java/beans/BeanProperty.html#description()">description</a>="A string that specifies the name of the L&amp;amp;F class")
        build/linux-x86_64-normal-server-release/images/docs/api/java.desktop/javax/swing/JRadioButton.html: <a href="../../java/beans/BeanProperty.html#description()">description</a>="A string that specifies the name of the L&amp;amp;F class.")

              serb Sergey Bylokhov
              jjg Jonathan Gibbons
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: