diff --git a/src/main/java/com/prowidesoftware/swift/io/parser/XMLParser.java b/src/main/java/com/prowidesoftware/swift/io/parser/XMLParser.java index 1e52044d..f0248ee2 100644 --- a/src/main/java/com/prowidesoftware/swift/io/parser/XMLParser.java +++ b/src/main/java/com/prowidesoftware/swift/io/parser/XMLParser.java @@ -59,7 +59,7 @@ public class XMLParser { * @see com.prowidesoftware.swift.io.IConversionService#getMessageFromXML(java.lang.String) */ public SwiftMessage parse(final String xml) { - Validate.notNull(xml); + Validate.isTrue(xml != null); try { final DocumentBuilder db = SafeXmlUtils.documentBuilder(); final Document doc = db.parse(new ByteArrayInputStream(xml.getBytes(StandardCharsets.UTF_8))); diff --git a/src/main/java/com/prowidesoftware/swift/model/SwiftTagListBlock.java b/src/main/java/com/prowidesoftware/swift/model/SwiftTagListBlock.java index 242bf6b0..be8dafa5 100644 --- a/src/main/java/com/prowidesoftware/swift/model/SwiftTagListBlock.java +++ b/src/main/java/com/prowidesoftware/swift/model/SwiftTagListBlock.java @@ -1909,7 +1909,7 @@ public SwiftTagListBlock append(final SwiftTagListBlock... blocks) { * @since 7.7 */ public SwiftTagListBlock append(final Tag tag) { - Validate.notNull(tag); + Validate.isTrue(tag != null); this.tags.add(tag); return this; }