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

java.awt.Point.setLocation(double, double) specs is incorrect.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 1.4.1
    • 1.4.0
    • docs
    • hopper
    • sparc
    • solaris_2.6



      Name: dsR10051 Date: 08/06/2001



      Javadoc specs for method:
      public void java.awt.Point.setLocation(double x,double y)
      is incorrect. It describes the float type of input parameters,
      but the parameters of this method have double type:

          /**
           * Sets the location of this point to the specified float coordinates.
                                                              ^^^^^
           * The float values will be rounded to integer values.
                 ^^^^^
           * Any number smaller than <code>Integer.MIN_VALUE</code>
           * will be reset to <code>MIN_VALUE</code>, and any number
           * larger than <code>Integer.MAX_VALUE</code> will be
           * reset to <code>MAX_VALUE</code>.
           *
           * @param x the <i>x</i> coordinate of the new location
           * @param y the <i>y</i> coordinate of the new location
           * @see #getLocation
           * @see java.lang.Math#round(float)
                                       ^^^^^
           */
          public void setLocation(double x, double y) {
                                  |||||| ||||||
      This inconsistency should be fixed.

      ======================================================================

            sharonz Sharon Zakhour (Inactive)
            sdasunw Sda Sda (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: