This commit is contained in:
Redkale
2017-03-22 11:28:21 +08:00
parent 19a44ce8cf
commit 4e83e5bf71

View File

@@ -268,6 +268,7 @@ public abstract class Sncp {
for (char ch : name.toCharArray()) {
if (!((ch >= '0' && ch <= '9') || ch == '_' || (ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z'))) normal = false;
}
if (!normal) throw new RuntimeException(serviceClass + "'s resource name is illegal, must be 0-9 _ a-z A-Z");
newDynName += "_" + (normal ? name : hash(name));
}
try {