Comment #1 on issue 458 by Remove clone() from all interfaces, it is wrong; make them extend Cloneable, instead.

Actually, the problem is in Java itself. The Object#clone() method declared as protected, and this causes "&" operator to fail. The easiest (but not the most elegant solution) is to have some T cloneMe() method in the interfaces. If Cloneable is also desirable, it's fine. The implementing class then supposed to implement both methods, clone() and cloneMe(). Also, in this case clone() method might be declared protected to avoid the confusing of having both public methods doing essentially the same.

You received this message because you are subscribed to the Google Groups "Protocol 
Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
To post to this group, send email to
Visit this group at
For more options, visit

Reply via email to