Re: @Override annotations

2009-01-21 Thread Ted Dunning
Delete them? On Wed, Jan 21, 2009 at 9:07 PM, Jeff Eastman wrote: > I'm trying to compile the latest Mahout trunk on my MacBook using the JVM > 1.6.0 JRE and the @Override annotations are causing a lot of errors. There > must be a simple solution to this problem but I cannot recall it. Can > some

Re: @Override annotations

2009-01-21 Thread Jeff Eastman
IIRC, Eclipse adds them erroneously but some versions do not complain. I believe it is incorrect to use override annotations for implementing methods defined in interfaces. Am I the only person experiencing this problem? Jeff Ted Dunning wrote: Delete them? On Wed, Jan 21, 2009 at 9:07 PM,

Re: @Override annotations

2009-01-21 Thread Ted Dunning
More seriously, that means that the method that is annotated that way should be over-riding something and it isn't. If isn't supposed to over-ride something, then deleting the annotation is the right thing to do. If it IS supposed to over-ride and it isn't doing that, then you have found a bug.

Re: @Override annotations

2009-01-21 Thread Ted Dunning
See here: http://blogs.sun.com/ahe/?entry=override The upshot: If you want to generate code that compiles cleanly on 1.5 and 1.6, then you need to remove @override where you have implementations rather than over-rides. This makes @override wy less useful and makes eclipse a little bit more

Re: @Override annotations

2009-01-21 Thread Jeff Eastman
There are a lot of them and the commit log sez Sean added them: "Big ol' patch that mostly adds @Override for interface methods, for Java 6, but also tacks on a number of small performance tweaks and other small refactorings". Am I the only person seeing this problem? Jeff Ted Dunning wrote:

Re : @Override annotations

2009-01-21 Thread deneche abdelhakim
Last time I tried to compile the Mahout trunk, I got a similar problem. In my case, I'm using Eclipse and the errors were caused by the JDK Compliance Level (in the project properties). In short, I was using JVM 1.6 JRE but with 5.0 compliance level (forgot to change it !). I found the answer i

Re: Re : @Override annotations

2009-01-22 Thread Ted Dunning
I think mahout should compile with both 1.5 and 1.6. On Wed, Jan 21, 2009 at 11:23 PM, deneche abdelhakim wrote: > Last time I tried to compile the Mahout trunk, I got a similar problem. In > my case, I'm using Eclipse and the errors were caused by the JDK Compliance > Level (in the project prope

Re: Re : @Override annotations

2009-01-22 Thread deneche abdelhakim
solved" in . org.apache.mahout.classifier.bayes.BayesClassifier, and . org.apache.mahout.classifier.cbayes.CBayesClassifier May be I'm wrong, but Deque is available only in 1.6, no ? --- En date de : Jeu 22.1.09, Ted Dunning a écrit : > De: Ted Dunning > Objet: Re: Re : @Override a

Re: Re : @Override annotations

2009-01-22 Thread Sean Owen
Yes I added them since we are officially requiring Java 6 -- right? that was the conclusion on a recent thread. On Thu, Jan 22, 2009 at 9:33 AM, deneche abdelhakim wrote: > When you say 1.5, you mean the 1.5 JDK (or JRE in the case of Eclipse) ? > > Because, I just tried to compile the Mahout tru

Re: Re : @Override annotations

2009-01-22 Thread Jeff Eastman
I was able to get past the compiler problems by switching the compliance level to Java 6, thanks Deneche. IIRC, With Java 6.0, @Override *can* also be used if your method implements a method in a base interface. If this is the only 6.0 feature we are using it is a shame to preclude Java 5 comp

Re: Re : @Override annotations

2009-01-22 Thread Kay Kay
I thought we are using Java 6 because of the dependency on Hadoop ? Jeff Eastman wrote: I was able to get past the compiler problems by switching the compliance level to Java 6, thanks Deneche. IIRC, With Java 6.0, @Override *can* also be used if your method implements a method in a base int

Re: Re : @Override annotations

2009-01-22 Thread Sean Owen
Yep that was the real reason, as I understand it. It is not merely to use @Override on interface methods. On Thu, Jan 22, 2009 at 2:31 PM, Kay Kay wrote: > I thought we are using Java 6 because of the dependency on Hadoop ?

Re: Re : @Override annotations

2009-01-22 Thread Ted Dunning
Ahh... that is a different kettle. On Thu, Jan 22, 2009 at 6:31 AM, Kay Kay wrote: > I thought we are using Java 6 because of the dependency on Hadoop ? > > > > Jeff Eastman wrote: > >> I was able to get past the compiler problems by switching the compliance >> level to Java 6, thanks Deneche. I

Re: Re : @Override annotations

2009-01-22 Thread Grant Ingersoll
The Hadoop version we use requires 1.6. On Jan 22, 2009, at 4:05 AM, Ted Dunning wrote: I think mahout should compile with both 1.5 and 1.6. On Wed, Jan 21, 2009 at 11:23 PM, deneche abdelhakim >wrote: Last time I tried to compile the Mahout trunk, I got a similar problem. In my case, I'm