harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mikhail Loenko" <mloe...@gmail.com>
Subject Re: Do we want to be bug compatible? (was: Re: newbie to project-where to start from)
Date Mon, 20 Feb 2006 08:41:07 GMT
Anton

still no answer to: What is the goal of that firm spec compatibility?

Are you sure that if some usage scenario does not make sense for you
and for all progressive people in the world then there no application working
this way?

Think of the following: we release Harmony, people will try their apps
and find out
that they do not work. What will the people do?

I cannot recall an example, but when we were developing classes we have found
that the spec was changed from 1.4 to 1.5 to reflect existing
('buggy') behavior.

Sure, we do not have to copy obvious bugs like SIGSEGVs, but we still have to
carefully work with all the cases when we can potentially break existing
applications.

Thanks,
Mikhail

On 2/20/06, Anton Avtamonov <anton.avtamonov@gmail.com> wrote:
> On 2/19/06, Geir Magnusson Jr <geir@pobox.com> wrote:
> >
> >
> > Mikhail Loenko wrote:
> > > What is the goal of spec-compatibility for exceptions?
> > >
> > > 1. Existing applications that work well on Sun's Java might fail on Harmony.
> >
> > Right - this is a problem.  People will say that we're broken.  It's not
> > a easy conversation to have with users who don't care about license,
> > just want a good JRE to work with, so then delete our implementation.
>
> Sounds reasonable.
> However I hope the expected deviations for Sun's impl (if we talk
> about exceptions) should not be so dramatic... I hope we will be
> basing on both spec, impl behavior and common sense.
> For instance, there is javax.swing.GrayFilter class which constructor
> takes 'percentage of gray' parameter (a value in a [0-100] range).
> Spec doesn't state there should be IllegalArgumentException if the
> value is out of range, but both Sun's impl and common sense tell us it
> should be.
> Another case is if spec states IllegalArgumentException, but impl
> produces NPE... I don't believe there are applications which are
> really care about the particular kind of RuntimeException :-). So in
> this case I would follow the spec.
> Really, IllegalArgumentException is always a guard statement for
> definitely wrong usage of API (like setting percentage out of [0-100]
> range). Not too many people should break such 'common sense' idea.
> Besides, I hope we will have not too many places when Sun's impl and
> spec differ.
>
>
> >
> > > 2. Sun, once it discovers the bug, will most likely change the spec
> > > rather then impl,
> > > and we will have to return and fix our code
> >
> > Well, I don't really know if Sun would do that.  There is an expert
> > group that Sun has to deal with...
>
> I think we should try to be spec-compatible when possible. If the spec
> is changed - we will change the implementation.
>
> Actually, for the time being I don't know any applications which are
> broken because of using IllegalArgumentException instead of NPE or
> vise versa. Let's see if we have such and then decide. Before that,
> spec-compatibility looks more preferrable for me...
>
> --
> Anton Avtamonov,
> Intel Middleware Products Division
>

Mime
View raw message