| commit | 8b42ec5bd5cd9aa7a6d7b8159ff4a9911ba89175 | [log] [tgz] |
|---|---|---|
| author | Dave Borowitz <dborowitz@google.com> | Tue Oct 28 12:09:55 2014 -0700 |
| committer | Dave Borowitz <dborowitz@google.com> | Wed Oct 29 15:00:17 2014 -0700 |
| tree | 84accb1e86d78ad4cb0c638df05bd001aecc08b2 | |
| parent | 2e82f2f8a2bb1e10bf2d583a4e2309fbbc3e89d8 [diff] |
Turn on many more Eclipse warnings, and fix them
- Warn on empty statements, e.g. "for (;;);". These may be
typos and are easily replaced by "for (;;) {}" which is more
explicit.
- Warn on field hiding. This allows cleanup of many acceptance test
members, at the cost of a couple of renames and the occasional
suppression (when the field is in a public nested enum that shadows
a public constant).
- Warn on unnecessary casts.
- Warn on unused declared thrown exceptions. In addition to reducing
method signature length and number of imports, this also eliminated
some impossible catch blocks.
- Warn on missing @Override annotations.
- Warn on unused parameters. This is likely the most controversial,
as a few relatively common patterns require unused parameters in a
way that Eclipse can't ignore. However, it also resulted in cleanup
of a lot of unnecessary injections and method parameters, so I
think the cost was worth it.
Change-Id: I7224be8b1c798613a127c88507e8cce400679e5d