classpath
[Top][All Lists]
Advanced

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

StringBuffer question


From: Eric Blake
Subject: StringBuffer question
Date: Wed, 06 Mar 2002 15:15:06 -0700

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?

-- 
This signature intentionally left boring.

Eric Blake             address@hidden
  BYU student, free software programmer



reply via email to

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