|
Quick Lists
|
|
Bug ID:
|
4205002
|
|
Votes
|
0
|
|
Synopsis
|
Rectangle.intersection should say about non-intersecting rectangles
|
|
Category
|
guides:none
|
|
Reported Against
|
1.2.2
|
|
Release Fixed
|
|
|
State
|
11-Closed,
Will Not Fix,
bug
|
|
Priority:
|
4-Low
|
|
Related Bugs
|
4286619
,
4374642
|
|
Submit Date
|
22-JAN-1999
|
|
Description
|
The implementation of Rectangle.intersection and
javax.swing.SwingUtilities.computeIntersection was changed in JDK1.2.2C to return
a (0,0,0,0) rectangle instead of a bogus result if the intersection is empty -
a bugfix for 4118972 (which was surprisingly closed as not a bug).
However, the spec was not updated to mention this.
This change caused a JCK1.2a regression:
api/java_awt/Rectangle/descriptions.html#intersection16
The spec should be updated to clarify the handling of non-intersecting rectangles.
The JCK test cannot be updated until the complete specification is provided.
======================================================================
|
|
Work Around
|
N/A
|
|
Evaluation
|
I changed the SwingUtilities doc for computeIntersection
to fix my half of this bug. Now we just need to fix the
Rectangle intersection doc.
=================
The Rectangle docs will not be changed. See the discussion below:
Date: Wed, 20 Oct 1999 15:16:31 -0700 (PDT)
Subject: Re: Bug 4205002
Hi Scott,
Unfortunately, I don't like the idea of that method returning a
zero rectangle for empty. For one thing, it is an inaccurate
answer for the problem. That rectangle encloses no area, but it
exists. The answer to some intersections is "there *is* no
rectangle that can represent the answer". This is like the
difference between returning 0 or NaN from a floating point
operation.
Do not spec this method to return a zero rectangle.
...jim
xxxxx@xxxxx 1999-10-20
|
|
Comments
|
PLEASE NOTE: JDK6 is formerly known as Project Mustang
|
|
|
 |