Re: Override annotation preventing compilation

2010-05-25 Thread Paul Robinson
You should be able to implement clone(), you just can't have the @Override annotation on it. mmoossen wrote: > hi Paul! > > thanks for the insight! > but would it make more sense to have that method throwing by default > an UnsupportedOperationException or something similar so that people > that

Re: Override annotation preventing compilation

2010-05-25 Thread mmoossen
hi Paul! thanks for the insight! but would it make more sense to have that method throwing by default an UnsupportedOperationException or something similar so that people that override that method can compile their classes? (btw, i now that you should not use the clone() pattern, but this is a leg

Re: Override annotation preventing compilation

2010-05-25 Thread Paul Robinson
GWT does not emulate the clone() method on Object, so when you compile client-side code there is no method for your clone() to override. Paul mmoossen wrote: > hi Sri! > > i thought it was something like that but: > - i am using java 1.6 > - clone() is a method in Object and not in the interfac,

Re: Override annotation preventing compilation

2010-05-25 Thread mmoossen
hi Sri! i thought it was something like that but: - i am using java 1.6 - clone() is a method in Object and not in the interfac, and - as said, eclipse wants that annotation (if not i get a warning) and i get an error only when compiling client code. thanks anyhow Michael On May 25, 12:40 pm, Sr

Re: Override annotation preventing compilation

2010-05-25 Thread Sripathi Krishnan
I think it is the javac compiler failing, not GWTC. Also, I'd guess you are using JDK 1.5. In JDK 1.5, @Override annotation cannot be applied to methods that implement an interface; they can only be applied to a method that overrides a method from a class. In your case, the clone method is defined

Override annotation preventing compilation

2010-05-25 Thread mmoossen
Dear all, I have a serializable object that overrides the Object.clone() method and implements the cloneable interface. and i have the problem that eclipse (and me too) wants to have the Override annotation but while compiling the GWT compiler fails with following error message [java][ERROR] Line