On Wed, Mar 17, 2010 at 14:24, Ulf Zibis <ulf.zi...@gmx.de> wrote:
> Am 17.03.2010 20:12, schrieb Martin Buchholz:
>>
>> On Wed, Mar 17, 2010 at 10:02, Ulf Zibis<ulf.zi...@gmx.de>  wrote:
>>
>>>
>>> Additionally I think, there's a bug in javadoc of those methods.
>>> Actually they throw StringIndexOutOfBoundsException.
>>>
>>
>> Why would that be a bug?
>>
>
> I think, javadoc should indicate StringIndexOutOfBoundsException here:

That would be an incompatible tightening of the spec.

To understand this, you need to think abstractly about
the specification and implementation of the Java Platform
as two completely separate things.

Martin

>    /**
>     * @throws IndexOutOfBoundsException {...@inheritdoc}
>     * @see        #length()
>     */
>    public synchronized char charAt(int index) {
>        if ((index < 0) || (index >= count))
>            throw new StringIndexOutOfBoundsException(index);
>        return value[index];
>    }
>
>
> Or am I not enough informed about {...@inheritdoc} ?
>
> -Ulf
>
>
>
>

Reply via email to