Re: should strings in exceptions match the reference implementation?

2006-04-18 Thread Chris Gray
On Tuesday 18 April 2006 01:34, Geir Magnusson Jr wrote: Really? Every other JRE uses the classlibrary from sun. Of the many open-source runtimes, none uses Sun's class library; almost all use Classpath. Among non-open source products, J9 has its own libraries, and I believe this is also

Re: should strings in exceptions match the reference implementation?

2006-04-18 Thread Chris Gray
On Tuesday 18 April 2006 04:20, Geir Magnusson Jr wrote: Good question though - what does GNU Classpath do? What GNU Classpath does is the same as what the Sun class libraries do, so the former no more needs the latter than Apache needs IIS ... (Sorry to be playing the pedant but I do

Re: should strings in exceptions match the reference implementation?

2006-04-18 Thread Mark Hindess
Are you saying that Classpath does match strings in exceptions? -Mark. On 4/18/06, Chris Gray [EMAIL PROTECTED] wrote: On Tuesday 18 April 2006 04:20, Geir Magnusson Jr wrote: Good question though - what does GNU Classpath do? What GNU Classpath does is the same as what the Sun class

Re: should strings in exceptions match the reference implementation?

2006-04-18 Thread Chris Gray
On Tuesday 18 April 2006 09:37, Mark Hindess wrote: Are you saying that Classpath does match strings in exceptions? No. Ah, I see: the do in Geir's question stood for what is Classpath's policy wrt to exception messages matching those of the RI?. Then I don't speak authoritatively, but I've

Re: should strings in exceptions match the reference implementation?

2006-04-18 Thread Mark Hindess
I thought my first message in this thread made this clear but obviously not. I'm not suggesting that code would care if the exception messages are identical. I was suggesting that it is probably now quite common for users to type error messages straight in to google. Therefore having messages

Re: should strings in exceptions match the reference implementation?

2006-04-18 Thread Anton Avtamonov
On 4/18/06, Mark Hindess [EMAIL PROTECTED] wrote: I thought my first message in this thread made this clear but obviously not. I'm not suggesting that code would care if the exception messages are identical. I was suggesting that it is probably now quite common for users to type error

Re: should strings in exceptions match the reference implementation?

2006-04-18 Thread Jimmy, Jing Lv
Anton Avtamonov wrote: On 4/18/06, Mark Hindess [EMAIL PROTECTED] wrote: I thought my first message in this thread made this clear but obviously not. I'm not suggesting that code would care if the exception messages are identical. I was suggesting that it is probably now quite common for

Re: should strings in exceptions match the reference implementation?

2006-04-18 Thread Paulex Yang
Mark Hindess wrote: I thought my first message in this thread made this clear but obviously not. I'm not suggesting that code would care if the exception messages are identical. I was suggesting that it is probably now quite common for users to type error messages straight in to google.

Re: should strings in exceptions match the reference implementation?

2006-04-18 Thread Geir Magnusson Jr
Chris Gray wrote: On Tuesday 18 April 2006 01:34, Geir Magnusson Jr wrote: Really? Every other JRE uses the classlibrary from sun. Of the many open-source runtimes, none uses Sun's class library; I'm aware of that - that's why we're here. But as I understand it, there are no complete

RE: should strings in exceptions match the reference implementation?

2006-04-18 Thread Semukhina, Elena V
the cause of an exception? Regards, Elena Semukhina Intel Middleware Products Division -Original Message- From: Geir Magnusson Jr [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 18, 2006 6:56 PM To: harmony-dev@incubator.apache.org Subject: Re: should strings in exceptions match the reference

Re: should strings in exceptions match the reference implementation?

2006-04-18 Thread Geir Magnusson Jr
strings in exceptions match the reference implementation? Yes - great example. The point is for mechanical means, but familiarity for users - we don't want them to be uncomfortable when using the Harmony class library - we want it to feel the same as when they use it from Sun... geir Mark

Re: should strings in exceptions match the reference implementation?

2006-04-18 Thread Dalibor Topic
Geir Magnusson Jr geir at pobox.com writes: Good question though - what does GNU Classpath do? Throw better exception messages, of course ;) I don't see a specific rule regarding this in the GNU Classpath hackers guide [1], but as long as a specific exception message (format) is not mandated

Re: should strings in exceptions match the reference implementation?

2006-04-17 Thread Mikhail Loenko
I think we may have this kind of tests. It is not a problem if we do not pass on other implementations - we will have a number of test types and some of them will stick to our implementation. it is OK. So if the message in exception is important (e.g. IMHO text for an NPE message in a

Re: should strings in exceptions match the reference implementation?

2006-04-17 Thread Mikhail Loenko
Why we should test something other than Harmony? We might run our tests on different implemetations to see whether/how they differ from Harmony, but we do not need special branches in our tests like if( isHarmony() ) { assert(harmony behavior) } else if( is BEA ) { assert(BEA behav) { } else

Re: should strings in exceptions match the reference implementation?

2006-04-17 Thread Anton Avtamonov
On 4/17/06, Mikhail Loenko [EMAIL PROTECTED] wrote: Why we should test something other than Harmony? We might run our tests on different implemetations to see whether/how they differ from Harmony, but we do not need special branches in our tests like if( isHarmony() ) { assert(harmony

Re: should strings in exceptions match the reference implementation?

2006-04-17 Thread Mikhail Loenko
2006/4/17, Anton Avtamonov [EMAIL PROTECTED]: In addition, I want to share what I do when testing exceptions. I created the following basic abstract class: protected abstract class ExceptionalCase { private Class clazz; private String msg; public abstract void

Re: should strings in exceptions match the reference implementation?

2006-04-17 Thread Mikhail Loenko
Sorry, Anton, I did not catch. Only one branch means no branches, just one way or does it mean two different ways (one normal way and one branch)? If we have just one way, why isHarmony() method necessary? Thanks, Mikhail 2006/4/17, Anton Avtamonov [EMAIL PROTECTED]: On 4/17/06, Mikhail

Re: should strings in exceptions match the reference implementation?

2006-04-17 Thread Andrew Zhang
Hello, Anton, On 4/17/06, Anton Avtamonov [EMAIL PROTECTED] wrote: No, we don't need all those branches. Only the branch for Harmony. Only for those cases when we DO know that we have a deviation. IMHO, I prefer to have all tests passing on RI (which verify tests itself) and on Harmony

Re: should strings in exceptions match the reference implementation?

2006-04-17 Thread Anton Avtamonov
On 4/17/06, Mikhail Loenko [EMAIL PROTECTED] wrote: Sorry, Anton, I did not catch. Only one branch means no branches, just one way or does it mean two different ways (one normal way and one branch)? If we have just one way, why isHarmony() method necessary? Mikhail, Formally two branches

Re: should strings in exceptions match the reference implementation?

2006-04-17 Thread Andrew Zhang
Very sorry, there're some typing mistakes in last letter. Please ignore it. Hello, Anton, On 4/17/06, Andrew Zhang [EMAIL PROTECTED] wrote: On 4/17/06, Anton Avtamonov [EMAIL PROTECTED] wrote: No, we don't need all those branches. Only the branch for Harmony. Only for those cases when

Re: should strings in exceptions match the reference implementation?

2006-04-17 Thread Anton Avtamonov
On 4/17/06, Andrew Zhang [EMAIL PROTECTED] wrote: Very sorry, there're some typing mistakes in last letter. Please ignore it. Exctually, I haven't noticed any :-). May be because I also do lots of them. I hope native-speakers will excuse us :-). Wishes, -- Anton Avtamonov, Intel Middleware

Re: should strings in exceptions match the reference implementation?

2006-04-17 Thread Anton Avtamonov
On 4/17/06, Mikhail Loenko [EMAIL PROTECTED] wrote: SNIP Why it is that complicated? Why one have jump over utility methods in different classes or even folders to understand what a 5-line test does? testSomething() throw OtherException { try {

Re: should strings in exceptions match the reference implementation?

2006-04-17 Thread Andrew Zhang
On 4/17/06, Anton Avtamonov [EMAIL PROTECTED] wrote: Well, not completely agree. I RI has BUG, I agree to have corresponding Harmony test failing. However do you think that different exception messges say is a good reason to have failures? I don't think so. Just a minor differemce which can

Re: should strings in exceptions match the reference implementation?

2006-04-17 Thread Anton Avtamonov
On 4/17/06, Andrew Zhang [EMAIL PROTECTED] wrote: On 4/17/06, Anton Avtamonov [EMAIL PROTECTED] wrote: Well, not completely agree. I RI has BUG, I agree to have corresponding Harmony test failing. However do you think that different exception messges say is a good reason to have failures?

Re: should strings in exceptions match the reference implementation?

2006-04-17 Thread Anton Avtamonov
Yes, and another problem is that it is hard to tell if the tests are currently running on Harmony or RI, even harder than to tell the platforms. Well, actually it is quite simple :-). It is enough just to check presence of some class which is specific for Harmony (something from

Re: should strings in exceptions match the reference implementation?

2006-04-17 Thread Mikhail Loenko
2006/4/17, Andrew Zhang [EMAIL PROTECTED]: On 4/17/06, Anton Avtamonov [EMAIL PROTECTED] wrote: Well, not completely agree. I RI has BUG, I agree to have corresponding Harmony test failing. However do you think that different exception messges say is a good reason to have failures? I

Re: should strings in exceptions match the reference implementation?

2006-04-17 Thread Andrew Zhang
Hi, MIkhail, Thanks for the information. I took a quick look at tests/api/java/util/regex/PatternSyntaxExceptionTest. Yes, the exception description is important to developers, however, I can't find the message defination in java spec. Am I missing something? If no, don't you think test case

Re: should strings in exceptions match the reference implementation?

2006-04-17 Thread Paulex Yang
Anton Avtamonov wrote: On 4/17/06, Andrew Zhang [EMAIL PROTECTED] wrote: On 4/17/06, Anton Avtamonov [EMAIL PROTECTED] wrote: Well, not completely agree. I RI has BUG, I agree to have corresponding Harmony test failing. However do you think that different exception messges say is a

Re: should strings in exceptions match the reference implementation?

2006-04-17 Thread Paulex Yang
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

Re: should strings in exceptions match the reference implementation?

2006-04-17 Thread Andrew Zhang
+1. Annotation is a good way to deliver such information. On 4/17/06, Paulex Yang [EMAIL PROTECTED] wrote: I consider the isHarmony() should be metadata, I have concerns to hard code in test cases. How about mark these test cases as non-compatible by annotation, by naming convention or more

Re: should strings in exceptions match the reference implementation?

2006-04-17 Thread Anton Avtamonov
I also agree. The only 'requirement' I would add is that it should be possible to do such mark-up on per-check basis rather than per-test_method or even per-test_class basic. Because each testMehtod() may have several checks only few of them will be harmony-dependent. -- Anton Avtamonov, Intel

Re: should strings in exceptions match the reference implementation?

2006-04-17 Thread Mikhail Loenko
Andrew, 2006/4/17, Andrew Zhang [EMAIL PROTECTED]: Hi, MIkhail, Thanks for the information. I took a quick look at tests/api/java/util/regex/PatternSyntaxExceptionTest. Yes, the exception description is important to developers, however, I can't find the message defination in java spec.

Re: should strings in exceptions match the reference implementation?

2006-04-17 Thread Geir Magnusson Jr
: 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

RE: should strings in exceptions match the reference implementation?

2006-04-17 Thread bootjvm
[Original Message] From: Mark Hindess [EMAIL PROTECTED] To: Harmony Dev harmony-dev@incubator.apache.org Date: 4/15/06 3:44:40 PM Subject: should strings in exceptions match the reference implementation? Another thing that came up when looking at PatternSyntaxExceptionTest (HARMONY-352

Re: should strings in exceptions match the reference implementation?

2006-04-17 Thread Paulex Yang
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

Re: should strings in exceptions match the reference implementation?

2006-04-17 Thread Geir Magnusson Jr
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

RE: should strings in exceptions match the reference implementation?

2006-04-17 Thread Nathan Beyer
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

Re: should strings in exceptions match the reference implementation?

2006-04-17 Thread Paulex Yang
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

Re: should strings in exceptions match the reference implementation?

2006-04-16 Thread Anton Avtamonov
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

Re: should strings in exceptions match the reference implementation?

2006-04-16 Thread Mark Hindess
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

should strings in exceptions match the reference implementation?

2006-04-15 Thread Mark Hindess
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

RE: should strings in exceptions match the reference implementation?

2006-04-15 Thread Nathan Beyer
, 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

Re: should strings in exceptions match the reference implementation?

2006-04-15 Thread Mikhail Loenko
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