From 6db778387d892237b4cce89a7f0fd98a4a612e1a Mon Sep 17 00:00:00 2001 From: ljacqu Date: Sun, 5 Mar 2017 11:08:43 +0100 Subject: [PATCH] Don't make CommandDescription final as to allow mocks - Construction of a CommandDescription requires a lot of fields to be set. In most tests we only care about one or two fields -> having to set a lot of fields to dummy values is not very nice. --- src/main/java/fr/xephi/authme/command/CommandDescription.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/fr/xephi/authme/command/CommandDescription.java b/src/main/java/fr/xephi/authme/command/CommandDescription.java index 57b92d73..e195c475 100644 --- a/src/main/java/fr/xephi/authme/command/CommandDescription.java +++ b/src/main/java/fr/xephi/authme/command/CommandDescription.java @@ -19,7 +19,8 @@ import static java.util.Arrays.asList; * {@code /authme} has a child whose label is {@code "register"}, then {@code /authme register} is the command that * the child defines. */ -public final class CommandDescription { +@SuppressWarnings("checkstyle:FinalClass") // Justification: class is mocked in multiple tests +public class CommandDescription { /** * Defines the labels to execute the command. For example, if labels are "register" and "r" and the parent is