You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Luc Maisonobe <Lu...@free.fr> on 2010/09/28 15:33:27 UTC
Re: svn commit: r1002145 - in /commons/proper/math/trunk/src: main/java/org/apache/commons/math/distribution/
test/java/org/apache/commons/math/distribution/
Le 28/09/2010 14:38, erans@apache.org a écrit :
> Author: erans
> Date: Tue Sep 28 12:38:09 2010
> New Revision: 1002145
>
> URL: http://svn.apache.org/viewvc?rev=1002145&view=rev
> Log:
> Removed deprecated code.
>
> Modified:
> commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/NormalDistribution.java
> commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/NormalDistributionImpl.java
> commons/proper/math/trunk/src/test/java/org/apache/commons/math/distribution/NormalDistributionTest.java
It seems some recent changes break compilation. Not in this specific
set, but probably one of the previous ones from today or yesterday.
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).
Luc
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org
Re: svn commit: r1002145 - in /commons/proper/math/trunk/src:
main/java/org/apache/commons/math/distribution/ test/java/org/apache/commons/math/distribution/
Posted by sebb <se...@gmail.com>.
On 28 September 2010 16:18, Luc Maisonobe <Lu...@free.fr> wrote:
> Le 28/09/2010 16:56, sebb a écrit :
>> On 28 September 2010 15:42, Luc Maisonobe <Lu...@free.fr> wrote:
>>> 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...
>>
>> It's an incompatibilty between Java 1.5 and Java 1.6.
>>
>>> 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."
>>>
>>
>> This is only true for Java 1.5.
>>
>>>>
>>>> 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.
>>
>> ... where they say that using @Override for interface implementations
>> would be confusing.
>>
>> But unfortunately they changed their minds with Java 1.6 -
>> implementations of interfaces should now have @Override tags.
>>
>> You can change the Eclipse settings to stop reporting this:
>>
>> Properties | Java Compiler | Errors/Warnings | Annotations | Missing
>> '@Override' | Include implementations of interface methods (1.6 or
>> higher)
>
> As we target 1.5 for [math], it may be better to not do that and staty
> with the strange behaviour.
I suggest *disabling* the warning of missing interface @Overrides for
any projects that must be 1.5 compatible.
Alternatively, make sure that Eclipse is set to use 1.5 to compile
Math, and it should not suggest adding the overrides.
> Luc
>
>>
>> I could not find an updated JLS which documents this.
>>
>> ---------------------------------------------------------------------
>> 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
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org
Re: svn commit: r1002145 - in /commons/proper/math/trunk/src: main/java/org/apache/commons/math/distribution/
test/java/org/apache/commons/math/distribution/
Posted by Luc Maisonobe <Lu...@free.fr>.
Le 28/09/2010 16:56, sebb a écrit :
> On 28 September 2010 15:42, Luc Maisonobe <Lu...@free.fr> wrote:
>> 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...
>
> It's an incompatibilty between Java 1.5 and Java 1.6.
>
>> 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."
>>
>
> This is only true for Java 1.5.
>
>>>
>>> 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.
>
> ... where they say that using @Override for interface implementations
> would be confusing.
>
> But unfortunately they changed their minds with Java 1.6 -
> implementations of interfaces should now have @Override tags.
>
> You can change the Eclipse settings to stop reporting this:
>
> Properties | Java Compiler | Errors/Warnings | Annotations | Missing
> '@Override' | Include implementations of interface methods (1.6 or
> higher)
As we target 1.5 for [math], it may be better to not do that and staty
with the strange behaviour.
Luc
>
> I could not find an updated JLS which documents this.
>
> ---------------------------------------------------------------------
> 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
Re: svn commit: r1002145 - in /commons/proper/math/trunk/src:
main/java/org/apache/commons/math/distribution/ test/java/org/apache/commons/math/distribution/
Posted by sebb <se...@gmail.com>.
On 28 September 2010 15:42, Luc Maisonobe <Lu...@free.fr> wrote:
> 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...
It's an incompatibilty between Java 1.5 and Java 1.6.
> 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."
>
This is only true for Java 1.5.
>>
>> 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.
... where they say that using @Override for interface implementations
would be confusing.
But unfortunately they changed their minds with Java 1.6 -
implementations of interfaces should now have @Override tags.
You can change the Eclipse settings to stop reporting this:
Properties | Java Compiler | Errors/Warnings | Annotations | Missing
'@Override' | Include implementations of interface methods (1.6 or
higher)
I could not find an updated JLS which documents this.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org
Re: svn commit: r1002145 - in /commons/proper/math/trunk/src: main/java/org/apache/commons/math/distribution/
test/java/org/apache/commons/math/distribution/
Posted by Luc Maisonobe <Lu...@free.fr>.
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
Re: svn commit: r1002145 - in /commons/proper/math/trunk/src:
main/java/org/apache/commons/math/distribution/ test/java/org/apache/commons/math/distribution/
Posted by Niall Pemberton <ni...@gmail.com>.
On Tue, Sep 28, 2010 at 3:25 PM, Gilles Sadowski
<gi...@harfang.homelinux.org> wrote:
>>
>> 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?
> Seems a bug in Eclipse...
>
> Is it the expected behaviour that "@Override" only means "overrides a
> method in a class but not in an interface"?
JDK 1.5 doesn't allow @Override for interface - JDK 1.6 does.
Niall
> [Anyway, I'll try and remove the annotations in all those problematic
> cases. I thought I was being nice in putting them :-}.]
>
>
> 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
Re: svn commit: r1002145 - in /commons/proper/math/trunk/src:
main/java/org/apache/commons/math/distribution/
test/java/org/apache/commons/math/distribution/
Posted by Gilles Sadowski <gi...@harfang.homelinux.org>.
>
> 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?
Seems a bug in Eclipse...
Is it the expected behaviour that "@Override" only means "overrides a
method in a class but not in an interface"?
[Anyway, I'll try and remove the annotations in all those problematic
cases. I thought I was being nice in putting them :-}.]
Gilles
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org