diff options
author | Jon Marius Venstad <venstad@gmail.com> | 2020-01-16 08:36:01 +0100 |
---|---|---|
committer | Jon Marius Venstad <venstad@gmail.com> | 2020-01-16 08:36:01 +0100 |
commit | 6fc71d74df5e6ceb7b0ed91bbb9f7d732b35dade (patch) | |
tree | 22813104b1daffdc95966d853b2b3c31c3545b28 /controller-api | |
parent | 1032436c17935fa0da7aadf75cce6a51e0197756 (diff) |
Validate instances names from all sources
Diffstat (limited to 'controller-api')
-rw-r--r-- | controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/identifiers/Identifier.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/identifiers/Identifier.java b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/identifiers/Identifier.java index 4007ac2b9cd..cccb41c27ef 100644 --- a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/identifiers/Identifier.java +++ b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/identifiers/Identifier.java @@ -13,7 +13,7 @@ import java.util.regex.Pattern; public abstract class Identifier { protected static final String strictPatternExplanation = - "New tenant or application names must start with a letter, may contain no more than 20 " + + "Tenant, application and instance names must start with a letter, may contain no more than 20 " + "characters, and may only contain lowercase letters, digits or dashes, but no double-dashes."; protected static final Pattern strictPattern = Pattern.compile("^(?=.{1,20}$)[a-z](-?[a-z0-9]+)*$"); private static final Pattern serializedIdentifierPattern = Pattern.compile("[a-zA-Z0-9_-]+"); @@ -95,7 +95,7 @@ public abstract class Identifier { } public static void throwInvalidId(String id, String explanation) { - throw new IllegalArgumentException(String.format("Invalid id: %s. %s", id, explanation)); + throw new IllegalArgumentException(String.format("Invalid id '%s'. %s", id, explanation)); } } |