harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark Hindess" <mark.hind...@googlemail.com>
Subject Re: [jira] Created: (HARMONY-266) java.security.Signature.getInstance(String,Provider) should match 5.0 reference implementations behaviour
Date Fri, 31 Mar 2006 12:53:33 GMT
As you say the fact that Sun changed this behaviour means anyone would
be crazy to depend on it.

But, in the recent discussion on the list, we concluded that we should
match RI behaviour unless that behaviour was plainly broken.  The
impact of testing for null twice doesn't seem like a good enough
reason not to match behaviour to me (and i'm suspect there is a
refactoring that would avoid this anyway).

I don't really mind if this is applied or not.  But, if this is
committed, then we need t o clarify the policy on matching behaviour.

Regards,
 Mark.

On 3/31/06, Mikhail Loenko <mloenko@gmail.com> wrote:
> Can we discuss this before applying the patch?
>
> I'd prefer not to change current behavior.
>
> The fact that Sun has changed their behavior means that they most likely do not
> care about that.
>
> Existing application are most likely expect 1.4 behavior.
>
> Original code does not check parameter 'algorithm' for null twice
> while the patched
> one does.
>
> Thanks,
> Mikhail
>
> >java.security.Signature.getInstance(String,Provider) should match 5.0
> reference implementations
> >behaviour
> >---------------------------------------------------------------------------------------------------
> >------
> >
> >         Key: HARMONY-266
> >         URL: http://issues.apache.org/jira/browse/HARMONY-266
> >     Project: Harmony
> >        Type: Bug
> >  Components: Classlib
> >    Reporter: Mark Hindess
> >    Priority: Trivial
> >
> >
> >Currently Harmony matches the 1.4 reference implementations behaviour
> with respect to exceptions
> >but it should match the 5.0 RI behaviour which means:
> >
> >Signature.getInstance((String)null,(String)null):
> >  RI throws j.l.NullPointerException but Harmony throws j.l.IllegalArgumentException
> >
> >Signature.getInstance((String)null,""):
> >  RI throws j.l.NullPointerException but Harmony throws j.l.IllegalArgumentException
> >
> >Signature.getInstance((String)null,(Provider)null):
> >  RI throws j.l.NullPointerException but Harmony throws j.l.IllegalArgumentException
> >
> >In other words, the order of the algorithm and providor validations
> should be reversed.
> >
> >I will attach a patch shortly.
> >
> >
> >--
> >This message is automatically generated by JIRA.
> >-
> >If you think it was sent incorrectly contact one of the administrators:
> >   http://issues.apache.org/jira/secure/Administrators.jspa
> >-
> >For more information on JIRA, see:
> >   http://www.atlassian.com/software/jira
>


--
Mark Hindess <mark.hindess@googlemail.com>
IBM Java Technology Centre, UK.

Mime
View raw message