--
guava-...@googlegroups.com.
http://groups.google.com/group/guava-discuss?hl=en
unsubscribe: guava-discus...@googlegroups.com
This list is for discussion; for help, post to Stack Overflow instead:
http://stackoverflow.com/questions/ask
Use the tag "guava".
Its a maven compatibility issue. If you use the m2eclipse plugin, it
automatically sets the compiler compliance level based on the <source>
value from the POM. Java and thus Maven *used* to generate compile
errors as well, but it appears that javac 1.6.0_18 does not generate
an error for @Override on interfaces.
I actually noticed that the (guava) issue tracker says you're
targeting 1.6 now, so I attached a patch (such as it is) with the
corrected source and target values for the POM to that issue.
I've heard this before, and I'm pretty sure I confirmed that it's true
for at least some @Overrides, but I tried one of Bradley's examples
this morning with 1.5.0.22 and found that it's not universal:
$ cat OverrideInterface.java
interface SuperInterface
{
void foo();
}
interface SubInterface extends SuperInterface
{
@Override void foo();
}
$ /opt/sun-jdk-1.5.0.22/bin/javac OverrideInterface.java
OverrideInterface.java:8: method does not override a method from its superclass
@Override void foo();
^
1 error
$ /opt/sun-jdk-1.6.0.20/bin/javac OverrideInterface.java
<success>
AFAIK 1.5.0.22 is as new as it gets: "J2SE 5.0 reached its End of
Service Life (EOSL) on November 3, 2009, which is the date of the
final publicly available update of version 5.0 (J2SE 5.0 Update 22)."
(This continues to work with -source 1.5 -target 1.5.)
This list is for discussion; for help, post to Stack Overflow instead:
http://stackoverflow.com/questions/ask
Use the tag "guava".