From 5ad528d5d92537eb11918f28eb7ce612b9156b6a Mon Sep 17 00:00:00 2001 From: ljacqu Date: Sat, 4 Feb 2017 11:35:22 +0100 Subject: [PATCH] Fix Javadoc errors (as seen in Jenkins build) --- .../fr/xephi/authme/message/MessageKey.java | 30 +++++++++---------- .../util/lazytags/WrappedTagReplacer.java | 2 +- .../messages/AddJavaDocToMessageEnumTask.java | 3 +- 3 files changed, 18 insertions(+), 17 deletions(-) diff --git a/src/main/java/fr/xephi/authme/message/MessageKey.java b/src/main/java/fr/xephi/authme/message/MessageKey.java index 6cc57480f..7546a89c0 100644 --- a/src/main/java/fr/xephi/authme/message/MessageKey.java +++ b/src/main/java/fr/xephi/authme/message/MessageKey.java @@ -17,7 +17,7 @@ public enum MessageKey { /** AntiBot protection mode is enabled! You have to wait some minutes before joining the server. */ KICK_ANTIBOT("kick_antibot"), - /** Can't find the requested user in the database! */ + /** This user isn't registered! */ UNKNOWN_USER("unknown_user"), /** Your quit location was unsafe, you have been teleported to the world's spawnpoint. */ @@ -26,7 +26,7 @@ public enum MessageKey { /** You're not logged in! */ NOT_LOGGED_IN("not_logged_in"), - /** Usage: /login <password> */ + /** Usage: /login <password> */ USAGE_LOGIN("usage_log"), /** Wrong password! */ @@ -56,19 +56,19 @@ public enum MessageKey { /** An unexpected error occurred, please contact an administrator! */ ERROR("error"), - /** Please, login with the command "/login <password>" */ + /** Please, login with the command: /login <password> */ LOGIN_MESSAGE("login_msg"), - /** Please, register to the server with the command "/register <password> <ConfirmPassword>" */ + /** Please, register to the server with the command: /register <password> <ConfirmPassword> */ REGISTER_MESSAGE("reg_msg"), /** You have exceeded the maximum number of registrations (%reg_count/%max_acc %reg_names) for your connection! */ MAX_REGISTER_EXCEEDED("max_reg", "%max_acc", "%reg_count", "%reg_names"), - /** Usage: /register <password> <ConfirmPassword> */ + /** Usage: /register <password> <ConfirmPassword> */ USAGE_REGISTER("usage_reg"), - /** Usage: /unregister <password> */ + /** Usage: /unregister <password> */ USAGE_UNREGISTER("usage_unreg"), /** Password changed successfully! */ @@ -95,7 +95,7 @@ public enum MessageKey { /** You're already logged in! */ ALREADY_LOGGED_IN_ERROR("logged_in"), - /** Logged-out successfully! */ + /** Logged out successfully! */ LOGOUT_SUCCESS("logout"), /** The same username is already playing on the server! */ @@ -113,7 +113,7 @@ public enum MessageKey { /** Login timeout exceeded, you have been kicked from the server, please try again! */ LOGIN_TIMEOUT_ERROR("timeout"), - /** Usage: /changepassword <oldPassword> <newPassword> */ + /** Usage: /changepassword <oldPassword> <newPassword> */ USAGE_CHANGE_PASSWORD("usage_changepassword"), /** Your username is either too short or too long! */ @@ -122,13 +122,13 @@ public enum MessageKey { /** Your username contains illegal characters. Allowed chars: REG_EX */ INVALID_NAME_CHARACTERS("regex", "REG_EX"), - /** Please add your email to your account with the command "/email add <yourEmail> <confirmEmail>" */ + /** Please add your email to your account with the command: /email add <yourEmail> <confirmEmail> */ ADD_EMAIL_MESSAGE("add_email"), - /** Forgot your password? Please use the command "/email recovery <yourEmail>" */ + /** Forgot your password? Please use the command: /email recovery <yourEmail> */ FORGOT_PASSWORD_MESSAGE("recovery_email"), - /** To login you have to solve a captcha code, please use the command "/captcha <theCaptcha>" */ + /** To login you have to solve a captcha code, please use the command: /captcha <theCaptcha> */ USAGE_CAPTCHA("usage_captcha", ""), /** Wrong captcha, please type "/captcha THE_CAPTCHA" into the chat! */ @@ -143,13 +143,13 @@ public enum MessageKey { /** The server is full, try again later! */ KICK_FULL_SERVER("kick_fullserver"), - /** Usage: /email add <email> <confirmEmail> */ + /** Usage: /email add <email> <confirmEmail> */ USAGE_ADD_EMAIL("usage_email_add"), - /** Usage: /email change <oldEmail> <newEmail> */ + /** Usage: /email change <oldEmail> <newEmail> */ USAGE_CHANGE_EMAIL("usage_email_change"), - /** Usage: /email recovery <Email> */ + /** Usage: /email recovery <Email> */ USAGE_RECOVER_EMAIL("usage_email_recovery"), /** Invalid new email, try again! */ @@ -224,7 +224,7 @@ public enum MessageKey { /** A recovery code to reset your password has been sent to your email. */ RECOVERY_CODE_SENT("recovery_code_sent"), - /** The recovery code is not correct! Use /email recovery [email] to generate a new one */ + /** The recovery code is not correct! Use "/email recovery [email]" to generate a new one */ INCORRECT_RECOVERY_CODE("recovery_code_incorrect"); private String key; diff --git a/src/main/java/fr/xephi/authme/util/lazytags/WrappedTagReplacer.java b/src/main/java/fr/xephi/authme/util/lazytags/WrappedTagReplacer.java index 92c3f70d4..ce9487e21 100644 --- a/src/main/java/fr/xephi/authme/util/lazytags/WrappedTagReplacer.java +++ b/src/main/java/fr/xephi/authme/util/lazytags/WrappedTagReplacer.java @@ -28,7 +28,7 @@ public class WrappedTagReplacer { * @param allTags all available tags * @param items the items to apply the replacements on * @param stringGetter getter of the String property to adapt on the items - * @param itemCreator a function of signature (T, String) -> T: the original item and the adapted String are passed + * @param itemCreator a function taking (T, String): the original item and the adapted String, returning a new item */ public WrappedTagReplacer(Collection> allTags, Collection items, diff --git a/src/test/java/tools/messages/AddJavaDocToMessageEnumTask.java b/src/test/java/tools/messages/AddJavaDocToMessageEnumTask.java index 30a632443..44306dc81 100644 --- a/src/test/java/tools/messages/AddJavaDocToMessageEnumTask.java +++ b/src/test/java/tools/messages/AddJavaDocToMessageEnumTask.java @@ -45,6 +45,7 @@ public class AddJavaDocToMessageEnumTask implements AutoToolTask { return configuration.getString(key.getKey()) .replaceAll("&[0-9a-f]", "") .replace("&", "&") - .replace("<", "<"); + .replace("<", "<") + .replace(">", ">"); } }