@Test public void testContextPathLegal() { String contextPath1 = "/nacos"; ValidatorUtils.checkContextPath(contextPath1); String contextPath2 = "nacos"; ValidatorUtils.checkContextPath(contextPath2); String contextPath3 = "/"; ValidatorUtils.checkContextPath(contextPath3); String contextPath4 = ""; ValidatorUtils.checkContextPath(contextPath4); }
public static void checkContextPath(String contextPath) { if (contextPath == null) { return; } Matcher matcher = CONTEXT_PATH_MATCH.matcher(contextPath); if (matcher.find()) { throw new IllegalArgumentException("Illegal url path expression"); } }
ValidatorUtils { public static void checkContextPath(String contextPath) { if (contextPath == null) { return; } Matcher matcher = CONTEXT_PATH_MATCH.matcher(contextPath); if (matcher.find()) { throw new IllegalArgumentException("Illegal url path expression"); } } }
ValidatorUtils { public static void checkContextPath(String contextPath) { if (contextPath == null) { return; } Matcher matcher = CONTEXT_PATH_MATCH.matcher(contextPath); if (matcher.find()) { throw new IllegalArgumentException("Illegal url path expression"); } }  }
ValidatorUtils { public static void checkContextPath(String contextPath) { if (contextPath == null) { return; } Matcher matcher = CONTEXT_PATH_MATCH.matcher(contextPath); if (matcher.find()) { throw new IllegalArgumentException("Illegal url path expression"); } }  static void checkInitParam(Properties properties); static void checkContextPath(String contextPath); }
ValidatorUtils { public static void checkContextPath(String contextPath) { if (contextPath == null) { return; } Matcher matcher = CONTEXT_PATH_MATCH.matcher(contextPath); if (matcher.find()) { throw new IllegalArgumentException("Illegal url path expression"); } }  static void checkInitParam(Properties properties); static void checkContextPath(String contextPath);  }