commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Luc Maisonobe <Luc.Maison...@free.fr>
Subject Re: svn commit: r1002145 - in /commons/proper/math/trunk/src: main/java/org/apache/commons/math/distribution/ test/java/org/apache/commons/math/distribution/
Date Tue, 28 Sep 2010 14:42:23 GMT
Le 28/09/2010 16:25, Gilles Sadowski a écrit :
>>
>> It seems some recent changes break compilation. Not in this specific
>> set, but probably one of the previous ones from today or yesterday.
> 
> Break compilation?
> "mvn clean site" produces a "BUILD SUCCESSFUL" here.
> 
>> The problems are some @Override annotations in BetaDistributionImpl
>> (getAlpha, getBeta), GammaDistributionImpl (getalpha, getBeta) and
>> ExponentialDistributionImpl (getMean). They directly implement
>> interfaces and do not extend a superclass, so the Override annotation
>> generates an error (at least on Eclipse).
> 
> So, does that mean that Eclipse refuses to compile because of annotations?

Yes.

> Seems a bug in Eclipse...

No, it is the expected behaviour, or at least it is what I understand
from this:
<http://java.sun.com/docs/books/jls/third_edition/html/interfaces.html#9.6.1.4>

 "Note that if a method overrides a method from a superinterface but
  not from a superclass, using @Override will cause a compile-time
  error."


> 
> Is it the expected behaviour that "@Override" only means "overrides a
> method in a class but not in an interface"?

Yes.

> 
> [Anyway, I'll try and remove the annotations in all those problematic
> cases. I thought I was being nice in putting them :-}.]

I agree this is strange. They explain the rationale for it in the link
above.

Thanks
Luc

> 
> 
> Gilles
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Mime
View raw message