Nathan Beyer wrote:
This seems overly excessive and I'm fairly sure that other JREs don't match
every message of every exception in the RI.

Really? Every other JRE uses the classlibrary from sun. They would have the same messages, wouldn't they?

geir


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:[EMAIL PROTECTED]
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 <[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]


---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to