remove validation from Name.identifier

This commit is contained in:
Michael Nedzelsky
2015-10-02 00:45:42 +03:00
parent 001b1269b9
commit cc2dfc4937
5 changed files with 7 additions and 16 deletions
@@ -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("<")) {