Skip to content

Commit

Permalink
CU-86b14j4e0_SRU2024_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 ba1eadd commit 290a643
Show file tree
Hide file tree
Showing 6 changed files with 442 additions and 30 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,14 @@
import com.prowidesoftware.swift.model.field.Field16R;
import com.prowidesoftware.swift.model.field.Field16S;
import com.prowidesoftware.swift.model.field.GenericField;
import org.apache.commons.lang3.ArrayUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.Validate;

import java.io.Serializable;
import java.util.*;
import java.util.logging.Level;
import java.util.stream.Collectors;
import org.apache.commons.lang3.ArrayUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.Validate;

/**
* Base class for SWIFT blocks that contain and arbitrary <b>set of fields</b> (3, 4, 5 and user blocks).<br>
Expand Down Expand Up @@ -57,7 +58,8 @@ public class SwiftTagListBlock extends SwiftBlock implements Serializable, Itera
* Default constructor, shouldn't be used normally.
* present only for subclasses
*/
public SwiftTagListBlock() {}
public SwiftTagListBlock() {
}

/**
* Intended to be used by search results in this class
Expand Down Expand Up @@ -1327,8 +1329,8 @@ private int indexOfFirstValue(final String tagname, final String value, boolean
final Tag t = this.tags.get(i);
if ((ignoreCR && t.equalsIgnoreCR(new Tag(tagname, value)))
|| (!ignoreCR
&& StringUtils.equals(tagname, t.getName())
&& StringUtils.equals(value, t.getValue()))) {
&& StringUtils.equals(tagname, t.getName())
&& StringUtils.equals(value, t.getValue()))) {
return i;
}
}
Expand Down Expand Up @@ -1940,7 +1942,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 +1955,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
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ public static List<Field21T> getAll(final SwiftTagListBlock block) {
return result;
}
final Tag[] arr = block.getTagsByName(NAME);
if (arr != null && arr.length > 0) {
if (arr != null) {
for (final Tag f : arr) {
result.add(new Field21T(f));
}
Expand Down
Loading

0 comments on commit 290a643

Please sign in to comment.