sebb wrote:

> On 18/08/2009, Jörg Schaible <joerg.schai...@gmx.de> wrote:
>> Hi Sebb,
>>
>>  sebb wrote at Dienstag, 18. August 2009 14:48:
>>
>>
>>  >>  +
>>  >>  +    /**
>>  >>  +     * {...@inheritdoc}
>>  >>  +     */
>>  >>  +    public Object clone() {
>>  >>  +        FileSystemOptions clone = new FileSystemOptions();
>>  >>  +        clone.options = new TreeMap(options);
>>  >>  +        return clone;
>>  >>  +    }
>>  >
>>  > This clone() does not call super.clone() so won't work properly for
>>  > sub-classes.
>>
>>
>> I know, but since the key of the map is a private class anyway, it does
>> not
>>  make too much sense to derive from FileSystemOptions anyway ... don't
>>  you think?
> 
> In that case, you could make the class final.
> 
> In any case, it would be helpful to document that the clone() method
> is not written to be sub-classable.

You're right, it should be at least consistent. Committed.

- Jörg


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org

Reply via email to