harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nathan Beyer" <nbe...@kc.rr.com>
Subject RE: should strings in exceptions match the reference implementation?
Date Sat, 15 Apr 2006 21:40:14 GMT
This seems overly excessive and I'm fairly sure that other JREs don't match
every message of every exception in the RI.

I'm not opposed to matching messages to help consistency and debugging, but
I just don't want it to be a dictate for development and testing. The only
exception, no pun intended, to this would be if the specification defines a
format for the message and thus making it an explicit part of the API.

> -----Original Message-----
> From: Mark Hindess [mailto:mark.hindess@googlemail.com]
> Sent: Saturday, April 15, 2006 2:44 PM
> To: Harmony Dev
> Subject: should strings in exceptions match the reference implementation?
> 
> Another thing that came up when looking at PatternSyntaxExceptionTest
> (HARMONY-352) was that the test was testing for the strings in
> exceptions.  Since these were testing for strings not in the exceptions
> thrown by the new implementation (nor by the reference
> implementation), I thought about removing the tests and just ignoring
> the strings.  But then...
> 
> I remembered that two days ago I had solved a problem with tests
> failing on our windows build machine [0], by doing a google search for
> the exact string in the exception that was being thrown.  It would
> have been much harder to solve if the string didn't match the string
> thrown by the reference implementation.  So, I think we should try to
> match strings in exceptions because it will help our users when trying
> to debug problems.  Currently we don't in very many cases.
> 
> What do other people think?
> 
> Obviously we will have to match them if we are going to test for them
> in our API tests or they wont pass when run against a reference
> implementation.
> 
> My patch for the PatternSyntaxExceptionTest has the string tests with
> the expected values set to the values from the exceptions trhown by
> the RI.  But I've commented them out since harmony strings don't
> currently match and since the strings probably should have different
> line endings on different platforms.
> 
> Regards,
>  Mark.
> 
> [0] SystemRoot not being set in the environment when called from my
>     ant task.
> 
> --
> Mark Hindess <mark.hindess@googlemail.com>
> IBM Java Technology Centre, UK.
> 
> ---------------------------------------------------------------------
> 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


---------------------------------------------------------------------
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


Mime
View raw message