From 75f84945fc9912c3df9e4e1033f4a409d9910910 Mon Sep 17 00:00:00 2001 From: ljacqu Date: Sun, 26 Mar 2017 13:20:40 +0200 Subject: [PATCH] Misc code householding - Checkstyle config: allow todo comments with issue number - Create consistency tests across all classes, ensuring: unique class names, users of expiring collectors implement HasCleanup, non-private fields are only constants - Fix tag replacement in PlayerListener for {DISPLAYNAME} --- .checkstyle.xml | 4 +- .../authme/debug/HasPermissionChecker.java | 3 +- .../xephi/authme/listener/PlayerListener.java | 2 +- .../service/PasswordRecoveryService.java | 9 +- .../authme/util/expiring/ExpiringMap.java | 9 +- .../authme/util/expiring/TimedCounter.java | 6 +- .../xephi/authme/ClassesConsistencyTest.java | 182 ++++++++++++++++++ .../authme/util/expiring/ExpiringMapTest.java | 2 +- .../util/expiring/TimedCounterTest.java | 4 +- 9 files changed, 210 insertions(+), 11 deletions(-) create mode 100644 src/test/java/fr/xephi/authme/ClassesConsistencyTest.java diff --git a/.checkstyle.xml b/.checkstyle.xml index 017242e36..9a91018c8 100644 --- a/.checkstyle.xml +++ b/.checkstyle.xml @@ -28,7 +28,8 @@ - + + @@ -156,6 +157,7 @@ +