remove validation from Name.identifier
This commit is contained in:
@@ -52,9 +52,6 @@ public final class Name implements Comparable<Name> {
|
||||
|
||||
@NotNull
|
||||
public static Name identifier(@NotNull String name) {
|
||||
if (!isValidIdentifier(name)) {
|
||||
throw new IllegalArgumentException("invalid identifier: " + name);
|
||||
}
|
||||
return new Name(name, false);
|
||||
}
|
||||
|
||||
@@ -62,12 +59,6 @@ public final class Name implements Comparable<Name> {
|
||||
return !name.isEmpty() && !name.startsWith("<") && !name.contains(".") && !name.contains("/");
|
||||
}
|
||||
|
||||
/** Must be validated by caller */
|
||||
@NotNull
|
||||
public static Name identifierNoValidate(@NotNull String name) {
|
||||
return new Name(name, false);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public static Name special(@NotNull String name) {
|
||||
if (!name.startsWith("<")) {
|
||||
|
||||
Reference in New Issue
Block a user