Skip to content

Commit

Permalink
Merge branch 'main' into SRU2023_v10
Browse files Browse the repository at this point in the history
  • Loading branch information
zubri authored Sep 30, 2024
2 parents 8316563 + ef1ad32 commit 0d26e06
Show file tree
Hide file tree
Showing 734 changed files with 7,804 additions and 16,947 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

#### 10.1.17 - SNAPSHOT
* Added new `FieldEnum` with all the available field names
* Code security improvements as per CodeQL recommendations

#### 10.1.16 - June 2024
* (PW-1913) Added IBAN validation for Egypt local account structure
Expand Down
1 change: 1 addition & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ dependencies {
compileOnly 'jakarta.validation:jakarta.validation-api:3.0.2'

testImplementation 'jakarta.persistence:jakarta.persistence-api:3.1.0'
testImplementation 'jakarta.validation:jakarta.validation-api:3.1.0'
testImplementation('org.junit.jupiter:junit-jupiter:5.8.2')
testImplementation group: 'org.assertj', name: 'assertj-core', version: '3.22.0'
testImplementation group: 'org.xmlunit', name: 'xmlunit-core', version: '2.9.0'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,9 @@



import org.apache.commons.lang3.StringUtils;

import com.prowidesoftware.swift.model.field.SwiftParseUtils;
import com.prowidesoftware.swift.model.field.Field;
import com.prowidesoftware.swift.model.*;
import com.prowidesoftware.swift.utils.SwiftFormatUtils;
import org.apache.commons.lang3.StringUtils;

import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
Expand Down Expand Up @@ -204,14 +201,11 @@ public String getValue() {
*/
@Override
public String getValueDisplay(int component, Locale locale) {
if (component < 1 || component > 1) {
if (component != 1) {
throw new IllegalArgumentException("invalid component number " + component + " for field 101");
}
if (component == 1) {
//default format (as is)
return getComponent(1);
}
return null;
//default format (as is)
return getComponent(1);
}

/**
Expand All @@ -226,7 +220,7 @@ public String componentsPattern() {

/**
* Returns the field component types pattern.
*
* <p>
* This method returns a letter representing the type for each component in the Field. It supersedes
* the Components Pattern because it distinguishes between N (Number) and I (BigDecimal).
* @since 9.2.7
Expand Down Expand Up @@ -429,7 +423,7 @@ public static List<Field101> 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 Field101(f));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,9 @@
import com.prowidesoftware.swift.model.LogicalTerminalAddress;


import org.apache.commons.lang3.StringUtils;

import com.prowidesoftware.swift.model.field.SwiftParseUtils;
import com.prowidesoftware.swift.model.field.Field;
import com.prowidesoftware.swift.model.*;
import com.prowidesoftware.swift.utils.SwiftFormatUtils;
import org.apache.commons.lang3.StringUtils;

import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
Expand Down Expand Up @@ -205,14 +202,11 @@ public String getValue() {
*/
@Override
public String getValueDisplay(int component, Locale locale) {
if (component < 1 || component > 1) {
if (component != 1) {
throw new IllegalArgumentException("invalid component number " + component + " for field 102");
}
if (component == 1) {
//default format (as is)
return getComponent(1);
}
return null;
//default format (as is)
return getComponent(1);
}

/**
Expand All @@ -227,7 +221,7 @@ public String componentsPattern() {

/**
* Returns the field component types pattern.
*
* <p>
* This method returns a letter representing the type for each component in the Field. It supersedes
* the Components Pattern because it distinguishes between N (Number) and I (BigDecimal).
* @since 9.2.7
Expand Down Expand Up @@ -470,7 +464,7 @@ public static List<Field102> 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 Field102(f));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,9 @@



import org.apache.commons.lang3.StringUtils;

import com.prowidesoftware.swift.model.field.SwiftParseUtils;
import com.prowidesoftware.swift.model.field.Field;
import com.prowidesoftware.swift.model.*;
import com.prowidesoftware.swift.utils.SwiftFormatUtils;
import org.apache.commons.lang3.StringUtils;

import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
Expand Down Expand Up @@ -204,14 +201,11 @@ public String getValue() {
*/
@Override
public String getValueDisplay(int component, Locale locale) {
if (component < 1 || component > 1) {
if (component != 1) {
throw new IllegalArgumentException("invalid component number " + component + " for field 103");
}
if (component == 1) {
//default format (as is)
return getComponent(1);
}
return null;
//default format (as is)
return getComponent(1);
}

/**
Expand All @@ -226,7 +220,7 @@ public String componentsPattern() {

/**
* Returns the field component types pattern.
*
* <p>
* This method returns a letter representing the type for each component in the Field. It supersedes
* the Components Pattern because it distinguishes between N (Number) and I (BigDecimal).
* @since 9.2.7
Expand Down Expand Up @@ -429,7 +423,7 @@ public static List<Field103> 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 Field103(f));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,9 @@



import org.apache.commons.lang3.StringUtils;

import com.prowidesoftware.swift.model.field.SwiftParseUtils;
import com.prowidesoftware.swift.model.field.Field;
import com.prowidesoftware.swift.model.*;
import com.prowidesoftware.swift.utils.SwiftFormatUtils;
import org.apache.commons.lang3.StringUtils;

import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
Expand Down Expand Up @@ -204,14 +201,11 @@ public String getValue() {
*/
@Override
public String getValueDisplay(int component, Locale locale) {
if (component < 1 || component > 1) {
if (component != 1) {
throw new IllegalArgumentException("invalid component number " + component + " for field 104");
}
if (component == 1) {
//default format (as is)
return getComponent(1);
}
return null;
//default format (as is)
return getComponent(1);
}

/**
Expand All @@ -226,7 +220,7 @@ public String componentsPattern() {

/**
* Returns the field component types pattern.
*
* <p>
* This method returns a letter representing the type for each component in the Field. It supersedes
* the Components Pattern because it distinguishes between N (Number) and I (BigDecimal).
* @since 9.2.7
Expand Down Expand Up @@ -429,7 +423,7 @@ public static List<Field104> 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 Field104(f));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,9 @@
import java.math.BigInteger;


import org.apache.commons.lang3.StringUtils;

import com.prowidesoftware.swift.model.field.SwiftParseUtils;
import com.prowidesoftware.swift.model.field.Field;
import com.prowidesoftware.swift.model.*;
import com.prowidesoftware.swift.utils.SwiftFormatUtils;
import org.apache.commons.lang3.StringUtils;

import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
Expand Down Expand Up @@ -206,14 +203,11 @@ public String getValue() {
*/
@Override
public String getValueDisplay(int component, Locale locale) {
if (component < 1 || component > 1) {
if (component != 1) {
throw new IllegalArgumentException("invalid component number " + component + " for field 105");
}
if (component == 1) {
//default format (as is)
return getComponent(1);
}
return null;
//default format (as is)
return getComponent(1);
}

/**
Expand All @@ -228,7 +222,7 @@ public String componentsPattern() {

/**
* Returns the field component types pattern.
*
* <p>
* This method returns a letter representing the type for each component in the Field. It supersedes
* the Components Pattern because it distinguishes between N (Number) and I (BigDecimal).
* @since 9.2.7
Expand Down Expand Up @@ -394,32 +388,14 @@ public Field105 setComponent1(String component1) {
return this;
}

/**
* Set the component1 from a Long object.
* <br>
* <em>If the component being set is a fixed length number, the argument will not be
* padded.</em> It is recommended for these cases to use the setComponent1(String)
* method.
*
* @see #setComponent1(String)
* @since 9.2.7
*
* @param component1 the Long with the Delivery Monitoring content to set
* @return the field object to enable build pattern
*/
public Field105 setComponent1(java.lang.Long component1) {
setComponent(1, SwiftFormatUtils.getLong(component1));
return this;
}

/**
* Alternative method setter for field's Delivery Monitoring (component 1) as Number
*
* <p>
* This method supports java constant value boxing for simpler coding styles (ex: 10 becomes an Integer)
*
* @param component1 the Number with the Delivery Monitoring content to set
* @return the field object to enable build pattern
* @see #setDeliveryMonitoring(java.lang.Long)
*/
public Field105 setComponent1(java.lang.Number component1) {

Expand Down Expand Up @@ -449,27 +425,13 @@ public Field105 setDeliveryMonitoring(String component1) {
return setComponent1(component1);
}

/**
* Set the Delivery Monitoring (component 1) from a Long object.
*
* @see #setComponent1(java.lang.Long)
*
* @param component1 Long with the Delivery Monitoring content to set
* @return the field object to enable build pattern
* @since 9.2.7
*/
public Field105 setDeliveryMonitoring(java.lang.Long component1) {
return setComponent1(component1);
}

/**
* Alternative method setter for field's Delivery Monitoring (component 1) as Number
*
* <p>
* This method supports java constant value boxing for simpler coding styles (ex: 10 becomes an Integer)
*
* @param component1 the Number with the Delivery Monitoring content to set
* @return the field object to enable build pattern
* @see #setDeliveryMonitoring(java.lang.Long)
*/
public Field105 setDeliveryMonitoring(java.lang.Number component1) {
return setComponent1(component1);
Expand Down Expand Up @@ -540,7 +502,7 @@ public static List<Field105> 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 Field105(f));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,9 @@



import org.apache.commons.lang3.StringUtils;

import com.prowidesoftware.swift.model.field.SwiftParseUtils;
import com.prowidesoftware.swift.model.field.Field;
import com.prowidesoftware.swift.model.*;
import com.prowidesoftware.swift.utils.SwiftFormatUtils;
import org.apache.commons.lang3.StringUtils;

import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
Expand Down Expand Up @@ -204,14 +201,11 @@ public String getValue() {
*/
@Override
public String getValueDisplay(int component, Locale locale) {
if (component < 1 || component > 1) {
if (component != 1) {
throw new IllegalArgumentException("invalid component number " + component + " for field 106");
}
if (component == 1) {
//default format (as is)
return getComponent(1);
}
return null;
//default format (as is)
return getComponent(1);
}

/**
Expand All @@ -226,7 +220,7 @@ public String componentsPattern() {

/**
* Returns the field component types pattern.
*
* <p>
* This method returns a letter representing the type for each component in the Field. It supersedes
* the Components Pattern because it distinguishes between N (Number) and I (BigDecimal).
* @since 9.2.7
Expand Down Expand Up @@ -429,7 +423,7 @@ public static List<Field106> 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 Field106(f));
}
Expand Down
Loading

0 comments on commit 0d26e06

Please sign in to comment.