use IllegalArgumentException instead (#10745)

This commit is contained in:
William Cheng
2021-11-02 12:47:15 +08:00
committed by GitHub
parent 4f2b5ee36d
commit 48f81eef45
30 changed files with 30 additions and 30 deletions

View File

@@ -39,7 +39,7 @@ public class ServerConfiguration {
if (variables != null && variables.containsKey(name)) {
value = variables.get(name);
if (serverVariable.enumValues.size() > 0 && !serverVariable.enumValues.contains(value)) {
throw new RuntimeException("The variable " + name + " in the server URL has invalid value " + value + ".");
throw new IllegalArgumentException("The variable " + name + " in the server URL has invalid value " + value + ".");
}
}
url = url.replaceAll("\\{" + name + "\\}", value);