harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ilya Okomin" <ilya.oko...@gmail.com>
Subject Re: [jira] Created: (HARMONY-1538) [classlib][awt] Successor of CubicCurve2D throws NPE in contains() if getBounds2D() returns null
Date Tue, 26 Sep 2006 11:44:24 GMT
On 9/26/06, Ilya Okomin <ilya.okomin@gmail.com> wrote:
>
>
>
> On 9/26/06, Denis Kishenko <dkishenko@gmail.com> wrote:
> >
> > Ilya, so do you vote for non-bug status?
> >
> > You are right that Shape doesn't follow spec if getBounds2D returns
> > null - it means Shape implementation is invalid. But Harmony should
> > follow RI (if it's possible) even if paramters are invalid. In this
> > case we can follow RI esealy as you suggested to add null check.
>
>
> For this case I vote for "non-bug" status. Suggested CubicCurve2DImpl in
> the test sample is invalid implementation of the CubicCurve class.
>

Pardon, implementation of the CubicCurve2D class :)

 Thanks,
> Ilya.
>
> 2006/9/26, Ilya Okomin <ilya.okomin@gmail.com>:
> > > 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 < dkishenko@gmail.com> wrote:
> > > >
> > > > 2006/9/25, Ilya Okomin <ilya.okomin@gmail.com>:
> > > > > 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: harmony-dev-unsubscribe@incubator.apache.org
> > > > For additional commands, e-mail:
> > harmony-dev-help@incubator.apache.org
> > > >
> > > >
> > >
> > >
> > > --
> > > --
> > > Ilya Okomin
> > > Intel Middleware Products Division
> > >
> > >
> >
> >
> > --
> > Denis M. Kishenko
> > Intel Middleware Products Division
> >
> > ---------------------------------------------------------------------
> > Terms of use : http://incubator.apache.org/harmony/mailing.html
> > To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
> > For additional commands, e-mail: harmony-dev-help@incubator.apache.org
> >
> >
>
>
> --
> --
> Ilya Okomin
> Intel Middleware Products Division
>



-- 
--
Ilya Okomin
Intel Middleware Products Division

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message