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

Rectangle2D.intersect (etc) should specify whether params must be distinct

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 1.4.0
    • 1.3.0
    • docs
    • beta
    • generic
    • generic



      Name: rmT116609 Date: 01/05/2001


      java version "1.3.0"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0-C)
      Java HotSpot(TM) Client VM (build 1.3.0-C, mixed mode)

      Doc for Rectangle2D.intersect and similar methods should specify whether the
      params must be distinct or not. E.g. is this legal:

      Rectangle.intersect(oldRect, newRect, newRect);

      The methods Rectangle2D.intersect() and Rectangle2D.union() should state that
      the 'dest' parameter may be the same object as the 'src1' or 'src2' parameter.

      E.g. it should state that "Rectangle2D.intersect(r1, r2, r2)" is legal. This
      saves the user from having to create a 3rd rectangle to store the result.

      Note that CubicCurve2D.subdivide and QuadCurve2D.subdivide correctly state that
      "Either or both of the left and right arrays may be ... a reference to the same
      array as the src array." I am requesting that Rectangle2D do something similar.

      (Review ID: 114595)
      ======================================================================

            jballsunw Jennifer Ball (Inactive)
            rmandalasunw Ranjith Mandala (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: