I'm using GWT 2.4. I have this class, which overrides the clone() method ...
public class Attribute implements Serializable, Cloneable {
...
public Object clone() {
Object ret = null;
try {
ret = super.clone();
} catch (CloneNotSupportedException e) {
} // try
return ret;
}
Sadly, when I try and run my GWT test class, I get the compilation error
[ERROR] Line 113: The method clone() is undefined for the type Object
Anyone know how I can rewrite the above to avoid the compile errors while preserving the functionality? Thanks, - Dave
Object.clone
is not supported by the GWT compiler. If you really need support for it you can follow a work around suggested in this GWT issue: http://code.google.com/p/google-web-toolkit/issues/detail?id=5068
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With