mengdiwang / guava-libraries

Automatically exported from code.google.com/p/guava-libraries
Apache License 2.0
0 stars 0 forks source link

Eclipse 3.6.1 shows a lot of error/warning for missing @Override annotations #539

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Just download r08 and open as a project in Eclipse 3.6.1.

By default my eclipse configured to treat missing @Override annotation as error 
and I get tons of such errors.

But thanks to eclipse it could be fixed in 5 second with help of mass quick-fix.

It is possible to add those missing annotations?

I need it, because I support my own guava fork and missing annotations result 
in many false differences.

Original issue reported on code.google.com by kua...@gmail.com on 1 Feb 2011 at 9:43

GoogleCodeExporter commented 9 years ago
See issue #364

Original comment by ogregoire on 1 Feb 2011 at 10:26

GoogleCodeExporter commented 9 years ago
Is this related to the fact that Java 6 allows @Override on interface methods 
and Java 5 does not?

Original comment by fin...@gmail.com on 1 Feb 2011 at 11:18

GoogleCodeExporter commented 9 years ago
Well in issue 364 kevinb wrote "I'm sorry we moved to a source-level JDK6 
requirement without realizing it, but... we did".

So? It is not a problem to add missing annotations?
Should I attach a patch?

Original comment by kua...@gmail.com on 1 Feb 2011 at 1:58

GoogleCodeExporter commented 9 years ago
Yep, that's exactly the right conclusion.  We're not going to be compilable 
with a JDK5 compiler.  

Either a patch or just a list of files and line numbers will help us (we can't 
apply the patch directly since our internal codebase has slight variations).

Original comment by kevinb@google.com on 1 Feb 2011 at 8:04

GoogleCodeExporter commented 9 years ago
I just extract current guava-src-r08.zip and open in my Eclipse 3.6.2 
configured that missing @Override annotation is treated as Error.

If I post in this way:

com.google.common.base.Equivalences
 line 73
 line 78
 line 83
 line 87

would it be OK?

Original comment by kua...@gmail.com on 1 Mar 2011 at 2:56

GoogleCodeExporter commented 9 years ago
I totally misspoke... given that "thanks to eclipse it could be fixed in 5 
second with help of mass quick-fix" it will be a lot easier for one of us with 
access to the internal codebase and who uses eclipse to get them all added.  Of 
course, it won't exactly be a high-priority task, but I can see that it gets 
done.

Original comment by kevinb@google.com on 2 Mar 2011 at 2:33

GoogleCodeExporter commented 9 years ago
yes it is the best solution, because there around 250 "missing @Override" 
issues.

Original comment by kua...@gmail.com on 2 Mar 2011 at 3:05

GoogleCodeExporter commented 9 years ago

Original comment by kevinb@google.com on 19 Mar 2011 at 3:36

GoogleCodeExporter commented 9 years ago

Original comment by fry@google.com on 24 Mar 2011 at 2:14

GoogleCodeExporter commented 9 years ago

Original comment by kevinb@google.com on 11 May 2012 at 8:56

GoogleCodeExporter commented 9 years ago
This issue has been migrated to GitHub.

It can be found at https://github.com/google/guava/issues/<id>

Original comment by cgdecker@google.com on 1 Nov 2014 at 4:15

GoogleCodeExporter commented 9 years ago

Original comment by cgdecker@google.com on 3 Nov 2014 at 9:09