Update checkstyle config and CodeClimate exclusions

- Add new checkstyle checks: require Javadoc on large private methods, default in switch, declaration order & others
- Update path exclusions in CodeClimate config to match newly renamed classes (e.g. PHPBB -> PhpBB)
  - Create consistency check testing that excluded paths exist as classes
- Fix some trivial violations
This commit is contained in:
ljacqu
2017-03-23 10:34:28 +01:00
parent e77828b228
commit 32a664ef59
27 changed files with 185 additions and 93 deletions
@@ -7,6 +7,8 @@ import java.util.concurrent.TimeUnit;
* <p>
* Once the expiration of an entry has been reached, the counter resets
* to 0. The counter returns 0 rather than {@code null} for any given key.
*
* @param <K> the type of the key
*/
public class TimedCounter<K> extends ExpiringMap<K, Integer> {
@@ -47,8 +49,7 @@ public class TimedCounter<K> extends ExpiringMap<K, Integer> {
if (e != null) {
if (e.getValue() <= 0) {
remove(key);
}
else {
} else {
entries.put(key, new ExpiringEntry<>(e.getValue() - 1, e.getExpiration()));
}
}