I suggested to return false because spec says for Shape.getBounds2D()
method:
"Returns a high precision and more accurate bounding box of the Shape than
the getBounds method." and "Shape lies entirely within the indicated
Rectangle2D.". Method CubicCurve2D.contains() checks if specified coordinate
is inside the boundary of the shape. If point inside the shape it should be
inside the bounding box of this shape.
According to this, if the bounding box of the CubicCurve2D shape is null or
empty then there is not exist any point to be inside these bounds, hence
contains() just should return false.

Regards,
Ilya.


On 9/26/06, Denis Kishenko <[EMAIL PROTECTED]> wrote:

2006/9/25, Ilya Okomin <[EMAIL PROTECTED]>:
> To follow RI I would suggest to add check (if the bounds2D is null) to
the
> contains() method, in this case just to return false.
Yep, to follow RI we can check if the bounds2D is null but why you
suggest return false? I think in this case we have to execute
contains() but w/o optimization. It's the fourth possibility.

---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--
--
Ilya Okomin
Intel Middleware Products Division

Reply via email to