-Wcloneable ?

Mark Wielaard mark@klomp.org
Wed Jan 17 06:16:00 GMT 2001


Hi,
On Tue, Jan 16, 2001 at 02:08:40PM -0700, Tom Tromey wrote:
> Today I thought about implementing a `-Wcloneable' option which would
> cause gcj to warn if a class implements Cloneable but doesn't have a
> public clone() method. Would this be useful?
I don't know. There is nothing wrong with using the default Object.clone()
method. For (very) simple object a field-by-field copy is good enough.
Maybe it should check to see that the class only contains primitive fields
and Strings?
Cheers,
Mark


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /