1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2025-09-10 18:59:41 +02:00

requireNotNullOrEmpty -> requireNotNullNorEmpty

This commit is contained in:
Paul Schaub 2018-07-17 15:10:39 +02:00
parent cf2b3ef634
commit 74bebc13e6
Signed by: vanitasvitae
GPG key ID: 62BEE9264BF17311
32 changed files with 82 additions and 52 deletions

View file

@ -87,7 +87,7 @@ public class ExplicitMessageEncryptionElement implements ExtensionElement {
}
public ExplicitMessageEncryptionElement(String encryptionNamespace, String name) {
this.encryptionNamespace = StringUtils.requireNotNullOrEmpty(encryptionNamespace,
this.encryptionNamespace = StringUtils.requireNotNullNorEmpty(encryptionNamespace,
"encryptionNamespace must not be null");
this.name = name;
}

View file

@ -34,9 +34,9 @@ public class Tag implements NamedElement {
public Tag(String name, Type type, String value) {
// TODO According to XEP-0347 § 5.2 names are case insensitive. Uppercase them all?
this.name = StringUtils.requireNotNullOrEmpty(name, "name must not be null or empty");
this.name = StringUtils.requireNotNullNorEmpty(name, "name must not be null nor empty");
this.type = Objects.requireNonNull(type);
this.value = StringUtils.requireNotNullOrEmpty(value, "value must not be null or empty");
this.value = StringUtils.requireNotNullNorEmpty(value, "value must not be null nor empty");
if (this.name.length() > 32) {
throw new IllegalArgumentException("Meta Tag names must not be longer then 32 characters (XEP-0347 § 5.2");
}

View file

@ -37,7 +37,7 @@ public final class NodeInfo {
}
public NodeInfo(String nodeId, String sourceId, String cacheType) {
this.nodeId = StringUtils.requireNotNullOrEmpty(nodeId, "Node ID must not be null or empty");
this.nodeId = StringUtils.requireNotNullNorEmpty(nodeId, "Node ID must not be null nor empty");
this.sourceId = sourceId;
this.cacheType = cacheType;
}