Skip to content

Commit

Permalink
CU-86b14j4e0_check-code-security-reports-at-GitHub-for-all-repos
Browse files Browse the repository at this point in the history
  • Loading branch information
ptorres-prowide committed Sep 18, 2024
1 parent 58ce13f commit d296a78
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1940,7 +1940,7 @@ public SwiftTagListBlock append(final Tag... tags) {
* @since 7.7
*/
public SwiftTagListBlock append(final Field field) {
Validate.notNull(field);
Validate.isTrue(field != null);
this.tags.add(field.asTag());
return this;
}
Expand All @@ -1953,7 +1953,7 @@ public SwiftTagListBlock append(final Field field) {
* @since 7.8
*/
public SwiftTagListBlock append(final Field... fields) {
if (fields != null && fields.length > 0) {
if (fields != null) {
for (final Field f : fields) {
append(f);
}
Expand Down
12 changes: 12 additions & 0 deletions src/main/java/com/prowidesoftware/swift/model/field/Field12K.java
Original file line number Diff line number Diff line change
Expand Up @@ -491,6 +491,18 @@ public Field12K setVersion(String component1) {
return setNumber(component1);
}

/**
* Alternative method setter for field's Number (component 1) as as Number
*
* This method supports java constant value boxing for simpler coding styles (ex: 10 becomes an Integer)
*
* @param component1 the Number with the Number content to set
* @return the field object to enable build pattern
*/
public Field12K setNumber(java.lang.Number component1) {
return setComponent1(component1);
}

/**
* Returns the field's name composed by the field number and the letter option (if any).
* @return the static value of Field12K.NAME
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,7 @@ public Field27A setTotal(String component2) {
public Field27A setTotal(java.lang.Number component2) {
return setComponent2(component2);
}

/**
* Returns the field's name composed by the field number and the letter option (if any).
* @return the static value of Field27A.NAME
Expand Down

0 comments on commit d296a78

Please sign in to comment.