Java Solaris Communities Sun Store Join SDN My Profile Why Join?
 
Bug Database
Bug Detail
Quick Lists
Top 25 Bugs
Top 25 RFE's
Recently Closed Bugs
Printable Page Printable Page


Bug Database
Bug ID: 4286619
Votes 0
Synopsis Poor doc for java.awt.Rectangle.intersection(Rectangle)
Category guides:none
Reported Against kestrel
Release Fixed 1.4(merlin-beta)
State 10-Fix Delivered, bug
Priority: 4-Low
Related Bugs 4205002 , 4374642
Submit Date 01-NOV-1999
Description





The Java Doc for method 
public Rectangle java.awt.Rectangle.intersection(Rectangle r)
says:
----------
Computes the intersection of this Rectangle with the specified Rectangle. Returns a new Rectangle that
    represents the intersection of the two rectangles.
    Parameters:
        r - the specified Rectangle
    Returns:
        the largest Rectangle contained in both the specified Rectangle and in thisRectangle.
----------
and says nothing about result for non-intersection rectangles.
It is unclear what "largest Rectangle contained in both" mean in this case.

======================================================================
Work Around
N/A
Evaluation
Well, the text describing the return value was awkward, though it did say it returned a rectangle of size 0.  I reworded it to be more clear and flow better.  Fixed for merlin.
  xxxxx@xxxxx   2001-03-30



The checks for empty rectangles added (see bug bix #4286619 for more details.) 

======================================================================
Comments
  
  Include a link with my name & email   


PLEASE NOTE: JDK6 is formerly known as Project Mustang