[ISSUE #5885] Fix FAQurl's class FAQ url incorrect (#5886)

This commit is contained in:
mxsm
2023-01-17 16:05:47 +08:00
committed by GitHub
parent 2729d2e18e
commit 7cbdad378e
@@ -19,50 +19,51 @@ package org.apache.rocketmq.common.help;
public class FAQUrl {
public static final String APPLY_TOPIC_URL =
"http://rocketmq.apache.org/docs/faq/";
"https://rocketmq.apache.org/docs/bestPractice/22FAQ";
public static final String NAME_SERVER_ADDR_NOT_EXIST_URL =
"http://rocketmq.apache.org/docs/faq/";
"https://rocketmq.apache.org/docs/bestPractice/22FAQ";
public static final String GROUP_NAME_DUPLICATE_URL =
"http://rocketmq.apache.org/docs/faq/";
"https://rocketmq.apache.org/docs/bestPractice/22FAQ";
public static final String CLIENT_PARAMETER_CHECK_URL =
"http://rocketmq.apache.org/docs/faq/";
"https://rocketmq.apache.org/docs/bestPractice/22FAQ";
public static final String SUBSCRIPTION_GROUP_NOT_EXIST =
"http://rocketmq.apache.org/docs/faq/";
"https://rocketmq.apache.org/docs/bestPractice/22FAQ";
public static final String CLIENT_SERVICE_NOT_OK =
"http://rocketmq.apache.org/docs/faq/";
"https://rocketmq.apache.org/docs/bestPractice/22FAQ";
// FAQ: No route info of this topic, TopicABC
public static final String NO_TOPIC_ROUTE_INFO =
"http://rocketmq.apache.org/docs/faq/";
"https://rocketmq.apache.org/docs/bestPractice/22FAQ";
public static final String LOAD_JSON_EXCEPTION =
"http://rocketmq.apache.org/docs/faq/";
"https://rocketmq.apache.org/docs/bestPractice/22FAQ";
public static final String SAME_GROUP_DIFFERENT_TOPIC =
"http://rocketmq.apache.org/docs/faq/";
"https://rocketmq.apache.org/docs/bestPractice/22FAQ";
public static final String MQLIST_NOT_EXIST =
"http://rocketmq.apache.org/docs/faq/";
"https://rocketmq.apache.org/docs/bestPractice/22FAQ";
public static final String UNEXPECTED_EXCEPTION_URL =
"http://rocketmq.apache.org/docs/faq/";
"https://rocketmq.apache.org/docs/bestPractice/22FAQ";
public static final String SEND_MSG_FAILED =
"http://rocketmq.apache.org/docs/faq/";
"https://rocketmq.apache.org/docs/bestPractice/22FAQ";
public static final String UNKNOWN_HOST_EXCEPTION =
"http://rocketmq.apache.org/docs/faq/";
"https://rocketmq.apache.org/docs/bestPractice/22FAQ";
private static final String TIP_STRING_BEGIN = "\nSee ";
private static final String TIP_STRING_END = " for further details.";
private static final String MORE_INFORMATION = "For more information, please visit the url, ";
public static String suggestTodo(final String url) {
StringBuilder sb = new StringBuilder();
StringBuilder sb = new StringBuilder(TIP_STRING_BEGIN.length() + url.length() + TIP_STRING_END.length());
sb.append(TIP_STRING_BEGIN);
sb.append(url);
sb.append(TIP_STRING_END);
@@ -73,10 +74,10 @@ public class FAQUrl {
if (errorMessage != null) {
int index = errorMessage.indexOf(TIP_STRING_BEGIN);
if (-1 == index) {
StringBuilder sb = new StringBuilder();
StringBuilder sb = new StringBuilder(errorMessage.length() + UNEXPECTED_EXCEPTION_URL.length() + MORE_INFORMATION.length() + 1);
sb.append(errorMessage);
sb.append("\n");
sb.append("For more information, please visit the url, ");
sb.append(MORE_INFORMATION);
sb.append(UNEXPECTED_EXCEPTION_URL);
return sb.toString();
}