@Test public void shouldReturnEmptyLinkIfUnknownJavaDocType() { String value = getJavaDocSiteLink("io.quarkus.ConfigDocKey"); assertEquals(Constants.EMPTY, value); }
static String getJavaDocSiteLink(String type) { if (type.equals(Level.class.getName())) { return LEVEL_HACK_URL; } Matcher packageMatcher = PACKAGE_PATTERN.matcher(type); if (!packageMatcher.find()) { return Constants.EMPTY; } if (JAVA_PRIMITIVE_WRAPPERS.containsKey(type)) { return Constants.EMPTY; } if ("java".equals(packageMatcher.group(1))) { return OFFICIAL_JAVA_DOC_BASE_LINK + getJavaDocLinkForType(type); } String basePkgName = packageMatcher.group(1) + "." + packageMatcher.group(2) + "."; String javaDocBaseUrl = EXTENSION_JAVA_DOC_LINK.get(basePkgName); if (javaDocBaseUrl != null) { return javaDocBaseUrl + getJavaDocLinkForType(type); } return Constants.EMPTY; }
DocGeneratorUtil { static String getJavaDocSiteLink(String type) { if (type.equals(Level.class.getName())) { return LEVEL_HACK_URL; } Matcher packageMatcher = PACKAGE_PATTERN.matcher(type); if (!packageMatcher.find()) { return Constants.EMPTY; } if (JAVA_PRIMITIVE_WRAPPERS.containsKey(type)) { return Constants.EMPTY; } if ("java".equals(packageMatcher.group(1))) { return OFFICIAL_JAVA_DOC_BASE_LINK + getJavaDocLinkForType(type); } String basePkgName = packageMatcher.group(1) + "." + packageMatcher.group(2) + "."; String javaDocBaseUrl = EXTENSION_JAVA_DOC_LINK.get(basePkgName); if (javaDocBaseUrl != null) { return javaDocBaseUrl + getJavaDocLinkForType(type); } return Constants.EMPTY; } }
DocGeneratorUtil { static String getJavaDocSiteLink(String type) { if (type.equals(Level.class.getName())) { return LEVEL_HACK_URL; } Matcher packageMatcher = PACKAGE_PATTERN.matcher(type); if (!packageMatcher.find()) { return Constants.EMPTY; } if (JAVA_PRIMITIVE_WRAPPERS.containsKey(type)) { return Constants.EMPTY; } if ("java".equals(packageMatcher.group(1))) { return OFFICIAL_JAVA_DOC_BASE_LINK + getJavaDocLinkForType(type); } String basePkgName = packageMatcher.group(1) + "." + packageMatcher.group(2) + "."; String javaDocBaseUrl = EXTENSION_JAVA_DOC_LINK.get(basePkgName); if (javaDocBaseUrl != null) { return javaDocBaseUrl + getJavaDocLinkForType(type); } return Constants.EMPTY; }  }
DocGeneratorUtil { static String getJavaDocSiteLink(String type) { if (type.equals(Level.class.getName())) { return LEVEL_HACK_URL; } Matcher packageMatcher = PACKAGE_PATTERN.matcher(type); if (!packageMatcher.find()) { return Constants.EMPTY; } if (JAVA_PRIMITIVE_WRAPPERS.containsKey(type)) { return Constants.EMPTY; } if ("java".equals(packageMatcher.group(1))) { return OFFICIAL_JAVA_DOC_BASE_LINK + getJavaDocLinkForType(type); } String basePkgName = packageMatcher.group(1) + "." + packageMatcher.group(2) + "."; String javaDocBaseUrl = EXTENSION_JAVA_DOC_LINK.get(basePkgName); if (javaDocBaseUrl != null) { return javaDocBaseUrl + getJavaDocLinkForType(type); } return Constants.EMPTY; }  static String computeExtensionDocFileName(String configRoot); static String computeExtensionGeneralConfigDocFileName(String configRoot); static String computeConfigGroupDocFileName(String configGroupClassName); static String computeConfigRootDocFileName(String configRootClassName, String rootName); static void appendConfigItemsIntoExistingOnes(List<ConfigDocItem> existingConfigItems,
            List<ConfigDocItem> configDocItems); static void sort(List<ConfigDocItem> configDocItems); }
DocGeneratorUtil { static String getJavaDocSiteLink(String type) { if (type.equals(Level.class.getName())) { return LEVEL_HACK_URL; } Matcher packageMatcher = PACKAGE_PATTERN.matcher(type); if (!packageMatcher.find()) { return Constants.EMPTY; } if (JAVA_PRIMITIVE_WRAPPERS.containsKey(type)) { return Constants.EMPTY; } if ("java".equals(packageMatcher.group(1))) { return OFFICIAL_JAVA_DOC_BASE_LINK + getJavaDocLinkForType(type); } String basePkgName = packageMatcher.group(1) + "." + packageMatcher.group(2) + "."; String javaDocBaseUrl = EXTENSION_JAVA_DOC_LINK.get(basePkgName); if (javaDocBaseUrl != null) { return javaDocBaseUrl + getJavaDocLinkForType(type); } return Constants.EMPTY; }  static String computeExtensionDocFileName(String configRoot); static String computeExtensionGeneralConfigDocFileName(String configRoot); static String computeConfigGroupDocFileName(String configGroupClassName); static String computeConfigRootDocFileName(String configRootClassName, String rootName); static void appendConfigItemsIntoExistingOnes(List<ConfigDocItem> existingConfigItems,
            List<ConfigDocItem> configDocItems); static void sort(List<ConfigDocItem> configDocItems); static final String LEVEL_HACK_URL; }