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:
@@ -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()));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user