Re: [classlib] Exception throwing compatibility: java.util.Scanner

2006-07-12 Thread Richard Liang
Richard Liang wrote: Geir Magnusson Jr wrote: Richard Liang wrote: Geir Magnusson Jr wrote: Richard Liang wrote: For this case, I decide to follow "useRadix(int radix)". Please correct me if I'm wrong. Thanks a lot. Do you mean that you're going to follow the

Re: [classlib] Exception throwing compatibility: java.util.Scanner

2006-07-09 Thread Richard Liang
Geir Magnusson Jr wrote: Richard Liang wrote: Geir Magnusson Jr wrote: Richard Liang wrote: For this case, I decide to follow "useRadix(int radix)". Please correct me if I'm wrong. Thanks a lot. Do you mean that you're going to follow the spec? If so, we sh

Re: [classlib] Exception throwing compatibility: java.util.Scanner

2006-07-07 Thread Geir Magnusson Jr
Richard Liang wrote: > > > Geir Magnusson Jr wrote: >> Richard Liang wrote: >> >> >>> For this case, I decide to follow "useRadix(int radix)". Please correct >>> me if I'm wrong. Thanks a lot. >>> >>> >> >> Do you mean that you're going to follow the spec? If so, we should note >> that

Re: [classlib] Exception throwing compatibility: java.util.Scanner

2006-07-07 Thread Richard Liang
Geir Magnusson Jr wrote: Richard Liang wrote: For this case, I decide to follow "useRadix(int radix)". Please correct me if I'm wrong. Thanks a lot. Do you mean that you're going to follow the spec? If so, we should note that we're making a conscious decision to differ from the RI

Re: [classlib] Exception throwing compatibility: java.util.Scanner

2006-07-07 Thread Geir Magnusson Jr
Richard Liang wrote: > For this case, I decide to follow "useRadix(int radix)". Please correct > me if I'm wrong. Thanks a lot. > Do you mean that you're going to follow the spec? If so, we should note that we're making a conscious decision to differ from the RI. geir --

Re: [classlib] Exception throwing compatibility: java.util.Scanner

2006-07-07 Thread Geir Magnusson Jr
Richard Liang wrote: > > > Geir Magnusson Jr wrote: >> This is a great example. The last two aren't even legal exceptions for >> that method. >> >> It seems like the RI is doing random crap, and it wouldn't be something >> that someone would depend on... can you imagine? >> >> > Thanks a lo

Re: [classlib] Exception throwing compatibility: java.util.Scanner

2006-07-06 Thread Anton Avtamonov
On 7/7/06, Richard Liang <[EMAIL PROTECTED]> wrote: We may frequently encounter this confused situation, and I suggest we discuss the problems case by case if someone is not sure how to do. ;-) For this case, I decide to follow "useRadix(int radix)". Please correct me if I'm wrong. Thanks a lot

Re: [classlib] Exception throwing compatibility: java.util.Scanner

2006-07-06 Thread Richard Liang
Geir Magnusson Jr wrote: This is a great example. The last two aren't even legal exceptions for that method. It seems like the RI is doing random crap, and it wouldn't be something that someone would depend on... can you imagine? Thanks a lot, Geir. There may be a great deal of these "gre

Re: [classlib] Exception throwing compatibility: java.util.Scanner

2006-07-06 Thread Paulex Yang
Richard Liang wrote: Paulex Yang wrote: Richard Liang wrote: Hello All, When I'm trying to implement Scanner.nextInt(int radix), I met a problem. As we all know, Character.MIN_RADIX equals 2 and Character.MAX_RADIX equals 36, so the parameter radix can not less than 2 or greater than 36

Re: [classlib] Exception throwing compatibility: java.util.Scanner

2006-07-06 Thread Richard Liang
Chris Gray wrote: On Thursday 06 July 2006 16:49, Geir Magnusson Jr wrote: This is a great example. The last two aren't even legal exceptions for that method. It seems like the RI is doing random crap, and it wouldn't be something that someone would depend on... can you imagine? I

Re: [classlib] Exception throwing compatibility: java.util.Scanner

2006-07-06 Thread Chris Gray
On Thursday 06 July 2006 16:49, Geir Magnusson Jr wrote: > This is a great example. The last two aren't even legal exceptions for > that method. > > It seems like the RI is doing random crap, and it wouldn't be something > that someone would depend on... can you imagine? I think we have to distin

Re: [classlib] Exception throwing compatibility: java.util.Scanner

2006-07-06 Thread Geir Magnusson Jr
This is a great example. The last two aren't even legal exceptions for that method. It seems like the RI is doing random crap, and it wouldn't be something that someone would depend on... can you imagine? try { Scanner.nextInt(foo); } catch {StringInxOutOfBndsEx bar) { ... real problem..

Re: [classlib] Exception throwing compatibility: java.util.Scanner

2006-07-06 Thread Richard Liang
Anton Avtamonov wrote: Hi Richard, Very good example. You are right, spec says nothing about invalid radix processing for nextInt(). RI behavior just proves they have no guard check. However useRadix() produces IAE for the invalid radix and the sound of logic says that IAE is a proper reaction

Re: [classlib] Exception throwing compatibility: java.util.Scanner

2006-07-06 Thread Richard Liang
Paulex Yang wrote: Richard Liang wrote: Hello All, When I'm trying to implement Scanner.nextInt(int radix), I met a problem. As we all know, Character.MIN_RADIX equals 2 and Character.MAX_RADIX equals 36, so the parameter radix can not less than 2 or greater than 36, Otherwise that param

Re: [classlib] Exception throwing compatibility: java.util.Scanner

2006-07-06 Thread Paulex Yang
Richard Liang wrote: Hello All, When I'm trying to implement Scanner.nextInt(int radix), I met a problem. As we all know, Character.MIN_RADIX equals 2 and Character.MAX_RADIX equals 36, so the parameter radix can not less than 2 or greater than 36, Otherwise that parameter is illegal. But o

Re: [classlib] Exception throwing compatibility: java.util.Scanner

2006-07-06 Thread Anton Avtamonov
Hi Richard, Very good example. You are right, spec says nothing about invalid radix processing for nextInt(). RI behavior just proves they have no guard check. However useRadix() produces IAE for the invalid radix and the sound of logic says that IAE is a proper reaction for wrong radix in any me

[classlib] Exception throwing compatibility: java.util.Scanner

2006-07-06 Thread Richard Liang
Hello All, When I'm trying to implement Scanner.nextInt(int radix), I met a problem. As we all know, Character.MIN_RADIX equals 2 and Character.MAX_RADIX equals 36, so the parameter radix can not less than 2 or greater than 36, Otherwise that parameter is illegal. But on RI, when the paramet