[kaffe] Exception thrown but not declared
guilhem at kaffe.org
Fri Jul 18 04:13:01 PDT 2003
On Friday 18 July 2003 11:28, Dalibor Topic wrote:
> Dalibor Topic wrote:
> > Guilhem Lavaux wrote:
> >> Hi everyone,
> >> Fixing the behaviours of java.text against JDK 1.4.2 I am encountering
> >> some strange things. For example, java.text.ChoiceFormat.parse may
> >> raise a ParseException in JDK 1.4.2 although the interface does not
> >> permit it. This poses a problem because on one hand we want to be JDK
> >> compatible but on the other hand we cannot adapt Java compilers to our
> >> needs...
> >> Looking at GNU/Classpath they seem to have some more things
> >> implemented but the strict behaviour is also wrong. (sigh) What do you
> >> think we should do here ? Just pass it through ?
> > I looked briefly over the interfaces. NumberFormat.parse(String) throws
> > a ParseException. ChoiceFormat.parse(String), which overrides it,
> > doesn't.
> Argh, it's parse(String, ParsePosition). But I still assume tat
> ParseExceptions you see come from super.parse(String) calls.
> If no resolution can be found, just do as the spec says, and file a bug
> report on sun's bug database.
> dalibor topic
Thank you, I have seen the problem. Actually parse(String) used to return
Double(NaN) but to comply with the JDK's behaviour it should return null.
Anyway I do not see why NaN was returned it is a lot simpler to just return
More information about the kaffe