Skip to content

Commit 4cb7287

Browse files
committed
Allow name/namespace to start with digit
1 parent 752a7c4 commit 4cb7287

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

client/src/main/java/io/confluent/kafka/schemaregistry/client/rest/utils/RestValidation.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,7 @@ public static void checkName(String name, String propertyName) {
3030
if (name.length() > NAME_MAX_LENGTH) {
3131
throw new IllegalPropertyException(propertyName, "exceeds max length of " + NAME_MAX_LENGTH);
3232
}
33-
char first = name.charAt(0);
34-
if (!(Character.isLetter(first) || first == '_')) {
35-
throw new IllegalPropertyException(propertyName, "must start with a letter or underscore");
36-
}
37-
for (int i = 1; i < name.length(); i++) {
33+
for (int i = 0; i < name.length(); i++) {
3834
char c = name.charAt(i);
3935
if (!(Character.isLetterOrDigit(c) || c == '_' || c == '-')) {
4036
throw new IllegalPropertyException(propertyName, "illegal character '" + c + "'");

0 commit comments

Comments
 (0)