Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Link to the JBoss Logging Level and not the JDK one #10707

Merged
merged 1 commit into from
Jul 14, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import java.util.Locale;
import java.util.Map;
import java.util.NoSuchElementException;
import java.util.logging.Level;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.stream.Collectors;
Expand All @@ -21,6 +22,7 @@ public class DocGeneratorUtil {
private static final String CORE = "core";
private static final String CONFIG = "Config";
private static final String CONFIGURATION = "Configuration";
public static final String LEVEL_HACK_URL = "https://docs.jboss.org/jbossas/javadoc/7.1.2.Final/org/jboss/logmanager/Level.html";
private static String CONFIG_GROUP_DOC_PREFIX = "config-group-";
static final String VERTX_JAVA_DOC_SITE = "https://vertx.io/docs/apidocs/";
static final String OFFICIAL_JAVA_DOC_BASE_LINK = "https://docs.oracle.com/javase/8/docs/api/";
Expand Down Expand Up @@ -77,6 +79,12 @@ static String unbox(String type) {
* Get javadoc link of a given type value
*/
static String getJavaDocSiteLink(String type) {
if (type.equals(Level.class.getName())) {
//hack, we don't want to link to the JUL version, but the jboss logging version
//this seems like a one off use case so for now it is just hacked in here
//if there are other use cases we should do something more generic
return LEVEL_HACK_URL;
}
Matcher packageMatcher = PACKAGE_PATTERN.matcher(type);

if (!packageMatcher.find()) {
Expand Down