Fix 1.7 and 1.8 compatibility
This commit is contained in:
@@ -32,7 +32,7 @@ public final class ListenerConsistencyTest {
|
||||
"PlayerListener#onPlayerQuit", "ServerListener#onPluginDisable",
|
||||
"ServerListener#onServerPing", "ServerListener#onPluginEnable",
|
||||
"PlayerListener#onJoinMessage", "PlayerListener#onAsyncPlayerPreLoginEvent",
|
||||
"PlayerListener#onPlayerSpawn");
|
||||
"PlayerListener19#onPlayerSpawn");
|
||||
|
||||
@BeforeClass
|
||||
public static void collectListenerClasses() {
|
||||
@@ -120,7 +120,9 @@ public final class ListenerConsistencyTest {
|
||||
// Exclude any methods with "$" in it: jacoco creates a "$jacocoInit" method we want to ignore, and
|
||||
// methods like "access$000" are created by the compiler when a private member is being accessed by an inner
|
||||
// class, which is not of interest for us
|
||||
if (Modifier.isPrivate(method.getModifiers()) || method.getName().contains("$")) {
|
||||
// Also exclude getters
|
||||
String methodName = method.getName();
|
||||
if (Modifier.isPrivate(method.getModifiers()) || methodName.contains("$") || methodName.startsWith("get") || methodName.startsWith("is")) {
|
||||
return false;
|
||||
}
|
||||
// Skip reload() method (implementation of Reloadable interface)
|
||||
|
||||
Reference in New Issue
Block a user