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

Bad comment in Component.update() API

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 1.4.0
    • 1.3.0
    • docs
    • 1.4
    • sparc
    • solaris_9



      Name: jk109818 Date: 10/15/2002


      FULL PRODUCT VERSION :
      java version "1.3.1"
      Java(TM) 2 Runtime Environment, Standard Edition (build
      1.3.1-JPSE_1.3.1_20020611)
      Classic VM (build 1.3.1-JPSE_1.3.1_20020611, native threads, mipsjit)

      FULL OPERATING SYSTEM VERSION :
      This bug is in the api manual. Does not have relation with a
      specific operating system.

      A DESCRIPTION OF THE PROBLEM :

      Please see:
      http://java.sun.com/j2se/1.3/docs/api/java/awt/Component.html#update(java.awt.Graphics)


      The comment of the update(Graphics g) method of Component
      class is written as:
          /**
           * Updates this component.
           * <p>
           * The AWT calls the <code>update</code> method in
      response to a
           * call to <code>repaint</code. The appearance of the
           * component on the screen has not changed since the
      last call to
           * <code>update</code> or <code>paint</code>. You can
      assume that
           * the background is not cleared.
           * <p>
           * The <code>update</code>method of
      <code>Component</code>

      This have a HTML bug. The line
      <code>repaint</code. The appearance of...
      must be:
      <code>repaint</code>. The appearance of...
      But after correcting this, the meaning of the comment is not
      clear.
      Also the line
      The <code>update</code>method of
      must be:
      The <code>update</code> method of
      Note the space before the word method.


      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Read the code Component.java at line 1229
      Read the code Component.java at line 1234

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      The line 1229 of Component.java is:
           * call to <code>repaint</code. The appearance of the
      must be:
           * call to <code>repaint</code>. The appearance of the

      The line 1234 of Component.java is:
           * The <code>update</code>method of
      <code>Component</code>
      must be:
           * The <code>update</code> method of
      <code>Component</code>

      REPRODUCIBILITY :
      This bug can be reproduced always.
      (Review ID: 165388)
      ======================================================================

            sharonz Sharon Zakhour (Inactive)
            jkimsunw Jeffrey Kim (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: