@Test public void isEquals() { String url1 = "http: String url2 = "http: Assert.assertTrue(URLUtil.isEquals(url1, url2)); String url3 = "http: String url4 = "http: Assert.assertTrue(URLUtil.isEquals(url3, url4)); String url5 = "http: String url6 = "http: Assert.assertTrue(URLUtil.isEquals(url5, url6)); Assert.assertFalse(URLUtil.isEquals(null, url6)); Assert.assertFalse(URLUtil.isEquals(null, null)); }
public static boolean isEquals(String url1, String url2) { if (StringUtils.isEmpty(url1) || StringUtils.isEmpty(url2)) { return false; } String url1ComparePart = url1 .substring(url1.indexOf(SCHEMA_SEPRATOR) + SCHEMA_SEPRATOR.length()); String url2ComparePart = url2 .substring(url2.indexOf(SCHEMA_SEPRATOR) + SCHEMA_SEPRATOR.length()); return removeSlash(url1ComparePart).equals(removeSlash(url2ComparePart)); }
URLUtil { public static boolean isEquals(String url1, String url2) { if (StringUtils.isEmpty(url1) || StringUtils.isEmpty(url2)) { return false; } String url1ComparePart = url1 .substring(url1.indexOf(SCHEMA_SEPRATOR) + SCHEMA_SEPRATOR.length()); String url2ComparePart = url2 .substring(url2.indexOf(SCHEMA_SEPRATOR) + SCHEMA_SEPRATOR.length()); return removeSlash(url1ComparePart).equals(removeSlash(url2ComparePart)); } }
URLUtil { public static boolean isEquals(String url1, String url2) { if (StringUtils.isEmpty(url1) || StringUtils.isEmpty(url2)) { return false; } String url1ComparePart = url1 .substring(url1.indexOf(SCHEMA_SEPRATOR) + SCHEMA_SEPRATOR.length()); String url2ComparePart = url2 .substring(url2.indexOf(SCHEMA_SEPRATOR) + SCHEMA_SEPRATOR.length()); return removeSlash(url1ComparePart).equals(removeSlash(url2ComparePart)); }  }
URLUtil { public static boolean isEquals(String url1, String url2) { if (StringUtils.isEmpty(url1) || StringUtils.isEmpty(url2)) { return false; } String url1ComparePart = url1 .substring(url1.indexOf(SCHEMA_SEPRATOR) + SCHEMA_SEPRATOR.length()); String url2ComparePart = url2 .substring(url2.indexOf(SCHEMA_SEPRATOR) + SCHEMA_SEPRATOR.length()); return removeSlash(url1ComparePart).equals(removeSlash(url2ComparePart)); }  static String[] splitIpPort(String url); static String transform(String restUrl); static boolean isEquals(String url1, String url2); static List<String> dealMultiUrl(String urls); static List<String> getEnvConfigUrl(); static List<String> getEnvServerURL(); }
URLUtil { public static boolean isEquals(String url1, String url2) { if (StringUtils.isEmpty(url1) || StringUtils.isEmpty(url2)) { return false; } String url1ComparePart = url1 .substring(url1.indexOf(SCHEMA_SEPRATOR) + SCHEMA_SEPRATOR.length()); String url2ComparePart = url2 .substring(url2.indexOf(SCHEMA_SEPRATOR) + SCHEMA_SEPRATOR.length()); return removeSlash(url1ComparePart).equals(removeSlash(url2ComparePart)); }  static String[] splitIpPort(String url); static String transform(String restUrl); static boolean isEquals(String url1, String url2); static List<String> dealMultiUrl(String urls); static List<String> getEnvConfigUrl(); static List<String> getEnvServerURL();  }