classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: StringBuffer question


From: Brian Jones
Subject: Re: StringBuffer question
Date: 06 Mar 2002 18:57:36 -0500
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1

Eric Blake <address@hidden> writes:

> How strictly do we want to match Sun on StringBuffer?  In the 1.4
> Javadoc, many of the methods specify only @throws
> IndexOutOfBoundsException, which can be done as a side-effect of array
> operations.  Yet the JDK implementation seems to throw
> StringIndexOutOfBoundsException (a subclass), which requires explicit
> bounds checking.  The current Classpath implementation is a mix of both
> approaches, depending on which method you look at.  It would be nice if
> it were consistent.
> 
> Should we let the VM generate the more general exception implicitly,
> skipping explicit checks where possible; or should I make sure that
> Classpath throws the more specific StringIndexOutOfBoundsException any
> time Sun does?

I cannot get at the javadoc at the moment for 1.4, it seems to only
partially load.  The implementation should match what is specified
explicitly, and where such language is missing match behaviour
instead.  Generally, software written to specification should not fail
with Classpath if it works in Sun's VM is what I think we strive toward.

Brian
-- 
Brian Jones <address@hidden>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]