1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2025-09-09 18:29:45 +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

@ -39,8 +39,8 @@ public class BoBHash {
* @param hashType
*/
public BoBHash(String hash, String hashType) {
this.hash = StringUtils.requireNotNullOrEmpty(hash, "hash must not be null or empty");
this.hashType = StringUtils.requireNotNullOrEmpty(hashType, "hashType must not be null or empty");
this.hash = StringUtils.requireNotNullNorEmpty(hash, "hash must not be null nor empty");
this.hashType = StringUtils.requireNotNullNorEmpty(hashType, "hashType must not be null nor empty");
this.cid = this.hashType + '+' + this.hash + "@bob.xmpp.org";
}

View file

@ -288,7 +288,7 @@ public class Bytestream extends IQ {
*/
public StreamHost(final Jid JID, final String address, int port) {
this.JID = Objects.requireNonNull(JID, "StreamHost JID must not be null");
this.addy = StringUtils.requireNotNullOrEmpty(address, "StreamHost address must not be null");
this.addy = StringUtils.requireNotNullNorEmpty(address, "StreamHost address must not be null");
this.port = port;
}

View file

@ -318,8 +318,8 @@ public class DiscoverInfo extends IQ implements TypedCloneable<DiscoverInfo> {
* @param lang the entity's lang.
*/
public Identity(String category, String type, String name, String lang) {
this.category = StringUtils.requireNotNullOrEmpty(category, "category cannot be null");
this.type = StringUtils.requireNotNullOrEmpty(type, "type cannot be null");
this.category = StringUtils.requireNotNullNorEmpty(category, "category cannot be null");
this.type = StringUtils.requireNotNullNorEmpty(type, "type cannot be null");
this.key = XmppStringUtils.generateKey(category, type);
this.name = name;
this.lang = lang;
@ -500,7 +500,7 @@ public class DiscoverInfo extends IQ implements TypedCloneable<DiscoverInfo> {
* @param variable the feature's variable.
*/
public Feature(String variable) {
this.variable = StringUtils.requireNotNullOrEmpty(variable, "variable cannot be null");
this.variable = StringUtils.requireNotNullNorEmpty(variable, "variable cannot be null");
}
/**

View file

@ -68,8 +68,8 @@ public class Version extends IQ {
public Version(String name, String version, String os) {
super(ELEMENT, NAMESPACE);
this.setType(IQ.Type.result);
this.name = StringUtils.requireNotNullOrEmpty(name, "name must not be null");
this.version = StringUtils.requireNotNullOrEmpty(version, "version must not be null");
this.name = StringUtils.requireNotNullNorEmpty(name, "name must not be null");
this.version = StringUtils.requireNotNullNorEmpty(version, "version must not be null");
this.os = os;
}

View file

@ -68,7 +68,7 @@ public final class Jingle extends IQ {
private Jingle(String sessionId, JingleAction action, FullJid initiator, FullJid responder, JingleReason reason,
List<JingleContent> contents) {
super(ELEMENT, NAMESPACE);
this.sessionId = StringUtils.requireNotNullOrEmpty(sessionId, "Jingle session ID must not be null");
this.sessionId = StringUtils.requireNotNullNorEmpty(sessionId, "Jingle session ID must not be null");
this.action = Objects.requireNonNull(action, "Jingle action must not be null");
this.initiator = initiator;
this.responder = responder;
@ -190,7 +190,7 @@ public final class Jingle extends IQ {
}
public Builder setSessionId(String sessionId) {
StringUtils.requireNotNullOrEmpty(sessionId, "Session ID must not be null or empty");
StringUtils.requireNotNullNorEmpty(sessionId, "Session ID must not be null nor empty");
this.sid = sessionId;
return this;
}

View file

@ -75,7 +75,7 @@ public final class JingleContent implements NamedElement {
JingleContentDescription description, JingleContentTransport transport) {
this.creator = Objects.requireNonNull(creator, "Jingle content creator must not be null");
this.disposition = disposition;
this.name = StringUtils.requireNotNullOrEmpty(name, "Jingle content name must not be null or empty");
this.name = StringUtils.requireNotNullNorEmpty(name, "Jingle content name must not be null nor empty");
this.senders = senders;
this.description = description;
this.transport = transport;

View file

@ -41,7 +41,7 @@ public class JingleS5BTransport extends JingleContentTransport {
protected JingleS5BTransport(List<JingleContentTransportCandidate> candidates, JingleContentTransportInfo info, String streamId, String dstAddr, Bytestream.Mode mode) {
super(candidates, info);
StringUtils.requireNotNullOrEmpty(streamId, "sid MUST be neither null, nor empty.");
StringUtils.requireNotNullNorEmpty(streamId, "sid MUST be neither null, nor empty.");
this.streamId = streamId;
this.dstAddr = dstAddr;
this.mode = mode;

View file

@ -55,7 +55,7 @@ public class MessageCorrectExtension implements ExtensionElement {
private final String idInitialMessage;
public MessageCorrectExtension(String idInitialMessage) {
this.idInitialMessage = StringUtils.requireNotNullOrEmpty(idInitialMessage, "idInitialMessage must not be null");
this.idInitialMessage = StringUtils.requireNotNullNorEmpty(idInitialMessage, "idInitialMessage must not be null");
}
public String getIdInitialMessage() {

View file

@ -399,7 +399,7 @@ public final class PrivacyListManager extends Manager {
* @throws InterruptedException
*/
public PrivacyList getPrivacyList(String listName) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
listName = StringUtils.requireNotNullOrEmpty(listName, "List name must not be null");
listName = StringUtils.requireNotNullNorEmpty(listName, "List name must not be null");
return new PrivacyList(false, false, listName, getPrivacyListItems(listName));
}

View file

@ -86,7 +86,7 @@ public class Affiliation implements ExtensionElement {
* @param namespace the affiliation's namespace.
*/
public Affiliation(String node, Type affiliation, AffiliationNamespace namespace) {
this.node = StringUtils.requireNotNullOrEmpty(node, "node must not be null or empty");
this.node = StringUtils.requireNotNullNorEmpty(node, "node must not be null nor empty");
this.affiliation = affiliation;
this.jid = null;
this.namespace = Objects.requireNonNull(namespace);

View file

@ -57,8 +57,8 @@ public class SimplePayload implements ExtensionElement {
payload = xmlPayload;
elemName = StringUtils.requireNotNullOrEmpty(qname.getLocalPart(), "Could not determine element name from XML payload");
ns = StringUtils.requireNotNullOrEmpty(qname.getNamespaceURI(), "Could not determine namespace from XML payload");
elemName = StringUtils.requireNotNullNorEmpty(qname.getLocalPart(), "Could not determine element name from XML payload");
ns = StringUtils.requireNotNullNorEmpty(qname.getNamespaceURI(), "Could not determine namespace from XML payload");
}
/**

View file

@ -156,7 +156,7 @@ public class FormField implements NamedElement {
* @param variable the variable name of the question.
*/
public FormField(String variable) {
this.variable = StringUtils.requireNotNullOrEmpty(variable, "Variable must not be null or empty");
this.variable = StringUtils.requireNotNullNorEmpty(variable, "Variable must not be null nor empty");
}
/**