Mark Hindess wrote:
> Ok.  I think it's a little unfortunate for our users that we can't
> match error messages but you are probably correct about them being
> copyright.
>   
> So, the second issue, should we be checking for messages/descriptions
> in exception
> tests, even to match what Harmony throws?  If we do then our api tests
> wont pass on other implementations.
>   
I don't think so. The exception message is only read by human in most
cases(if not in all cases), while exception type can be evaluated by
program as well as human. So the compatibility of exception type with RI
is significant because throwing different exception class may break
applications, but I believe few application depends on exception
message, so it should be much safer to keep a little freedom on the
message writing. The freedom is only a little, because the message
itself should still be clear and make sense, but it's not necessary same
with RI, and it is not testable by JUnit(until one day AI is clever
enough to support assertMakeSense() ;-) ).

Besides, I agree that same message with RI may introduce legal issue.
> Regards,
>  Mark.
>
> On 4/17/06, Anton Avtamonov <[EMAIL PROTECTED]> wrote:
>   
>> On 4/17/06, LvJimmy,Jing <[EMAIL PROTECTED]> wrote:
>>     
>>> Agreed. Try some other words may be better. The only possible un-compatible
>>> with RI is that some rookie may write codes like:
>>> try{
>>>    ...
>>> }catch(Except e){
>>>    if (e.getMessage().equals(RI_String)){
>>>        dosomething;
>>>    }
>>> }
>>> But this kind of code is properly unstable and unacceptable,right?
>>>       
>> Agree. I expect there is no or almost no client applications doing
>> that. I think we shouldn't be message-compatible. Otherwise we would
>> have to be compatible with localized messages as well in assumption
>> someone checks for e.getLocalizedMessage() :-).
>>
>> --
>> Anton Avtamonov,
>> Intel Middleware Products Division
>>
>> ---------------------------------------------------------------------
>> Terms of use : http://incubator.apache.org/harmony/mailing.html
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>>     
>
>
> --
> Mark Hindess <[EMAIL PROTECTED]>
> IBM Java Technology Centre, UK.
>
> ---------------------------------------------------------------------
> Terms of use : http://incubator.apache.org/harmony/mailing.html
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>   


-- 
Paulex Yang
China Software Development Lab
IBM

Reply via email to