Simple covariant return type

Mathieu Malaterre mathieu.malaterre at gmail.com
Thu Jun 25 08:45:53 UTC 2009


On Thu, Jun 25, 2009 at 10:01 AM, Marcus Better<marcus at better.se> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Mathieu Malaterre wrote:
>>   I must be doing something wrong, but I do not see what is wrong with
>> the following piece of code (*). Is there a restriction when using ecj
>> as the java compiler ?
>
> The manpage for ecj indicates that it is building with source level 1.4 by
> default. Covariant return types are a Java 5 feature. Try the -1.5 switch.

Ok, I looked at the openjdk-6-jdk package and it seems there is no
such thing as -1.5, but instead -source 1.5.

So my question: is it ok for package maintainer to use javac -source
1.5 to compile code or will there be some portability glitch (user is
alowed to set other java compiler).

Thanks,
-- 
Mathieu



More information about the pkg-java-maintainers mailing list