RoutingEntry { public void setPathPattern(String pathPattern) { this.path = null; this.pathPattern = pathPattern; int i = 0; while (i < pathPattern.length()) { char c = pathPattern.charAt(i); if (c == '{') { i = skipNamedPattern(pathPattern, i, c); } else if (INVALID_PATH_CHARS.indexOf(c) != -1) { throw new DecodeException("Invalid character " + c + " for pathPattern"); } i++; } }  String[] getPermissionsRequired(); void setPermissionsRequired(String[] permissionsRequired); String[] getPermissionsDesired(); void setPermissionsDesired(String[] permissionsDesired); String[] getModulePermissions(); void setModulePermissions(String[] modulePermissions); @JsonIgnore ProxyType getProxyType(); String getType(); void setType(String type); String getRedirectPath(); void setRedirectPath(String redirectPath); String getUnit(); void setUnit(String unit); String getDelay(); void setDelay(String delay); @JsonIgnore long getDelayMilliSeconds(); String getLevel(); void setLevel(String level); @JsonIgnore String getPhaseLevel(); String[] getMethods(); void setMethods(String[] methods); @JsonIgnore HttpMethod getDefaultMethod(HttpMethod defaultMethod); @JsonIgnore String getStaticPath(); @JsonIgnore String generateSystemId(String moduleId); String getPath(); void setPath(String path); String getPathPattern(); String getRewritePath(); void setRewritePath(String rewritePath); void setPathPattern(String pathPattern); String[] getPermissionsRequiredTenant(); void setPermissionsRequiredTenant(String[] permissionsRequiredTenant); boolean matchUriTenant(String uri, String tenant); boolean match(String uri, String method); String getRedirectUri(String uri); String getPhase(); void setPhase(String phase); @JsonProperty("delegateCORS") boolean isDelegateCors(); void setDelegateCors(boolean delegateCors); String validateHandlers(ProxyContext pc, String mod); String validateFilters(ProxyContext pc, String mod);  }
@Test void testInvalidPatterns() { RoutingEntry t = new RoutingEntry(); assertThrows(DecodeException.class, () -> t.setPathPattern("/a{a{")); assertThrows(DecodeException.class, () -> t.setPathPattern("/a{")); assertThrows(DecodeException.class, () -> t.setPathPattern("/?a=b")); assertThrows(DecodeException.class, () -> t.setPathPattern("/a.b")); assertThrows(DecodeException.class, () -> t.setPathPattern("/a\\b")); assertThrows(DecodeException.class, () -> t.setPathPattern("/a{:}b")); }