On Mon, Mar 22, 2010 at 07:34, Ulf Zibis <[email protected]> wrote: > Am 21.03.2010 17:16, schrieb Martin Buchholz:
>> There is a debate about whether to reuse existing exception classes >> or to throw class-specific subclasses. IMO, IOOBE is a sufficiently >> expressive >> exception that I might have used just that, with expressive detail >> messages. >> > > I'm with you. Especially StringIndexOutOfBoundsException appears as > superfluous sugar to me. But we have it in the docs, so there is no way to > get rid of it. > What do you think about to refactor most IOOBEs in String related classes to > SIOOBEs? It would stay compatible to old Software, which still catches > IOOBEs, but would look more straight, tidy and clean and fix the below > mentioned bug. Every change is an incompatible change, with a risk/benefit tradeoff. IMO there is no change to the exceptions thrown, or declared to be thrown, or to their detail messages, in the string classes that is worth the risk of incompatible change. (with the exception of when the implementation contradicts the spec, which is worth fixing) Martin
