Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[dsdp-tm-dev] Re: IHostFilePermissions#clone()


I've changed the code now to use duplicate().

____________________________________
David McKnight    
Phone:   905-413-3902 , T/L:  969-3902
Internet: dmcknigh@xxxxxxxxxx
Mail:       D1/YFY/8200/TOR
____________________________________



"Oberhuber, Martin" <Martin.Oberhuber@xxxxxxxxxxxxx>

23/01/2008 04:51 AM

To
David McKnight/Toronto/IBM@IBMCA
cc
"Target Management developer discussions" <dsdp-tm-dev@xxxxxxxxxxx>
Subject
IHostFilePermissions#clone()





Hi Dave,

your new IHostFilePermissions#clone() method looks
odd to me, can you explain it?

Why don't you just require IHostFilePermissions
implementers to also implement Cloneable and
provide a public Object clone() method? See the
Java API docs for the Cloneable interface.

If you really don't like the Cloneable approach,
you'd better call your method differently
(e.g. duplicate()) and avoid the extra parameter.
Only like that you can ensure that if you have
two different implementations of IHostFilePermissions,
the method will create a proper duplicate.

Cheers,
--
Martin Oberhuber, Senior Member of Technical Staff, Wind River
Target Management Project Lead, DSDP PMC Member
http://www.eclipse.org/dsdp/tm



Back to the top