Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into SRU2024
Browse files Browse the repository at this point in the history
  • Loading branch information
zubri committed Sep 30, 2024
2 parents bfe88e2 + ef1ad32 commit 084577d
Show file tree
Hide file tree
Showing 684 changed files with 7,175 additions and 13,913 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 @@

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

#### 9.5.1 - 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 @@ -60,6 +60,7 @@ dependencies {
compileOnly 'javax.xml.bind:jaxb-api:2.3.1'
compileOnly 'javax.validation:validation-api:2.0.1.Final'

testImplementation 'javax.validation:validation-api:2.0.1.Final'
testImplementation 'javax.persistence:javax.persistence-api:2.2'
testImplementation 'org.junit.jupiter:junit-jupiter:5.10.2'
testImplementation 'org.assertj:assertj-core:3.25.3'
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 @@ -183,19 +180,16 @@ 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);
}

/**
* 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 @@ -398,7 +392,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 @@ -184,19 +181,16 @@ 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);
}

/**
* 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 @@ -439,7 +433,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 @@ -183,19 +180,16 @@ 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);
}

/**
* 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 @@ -398,7 +392,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 @@ -183,19 +180,16 @@ 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);
}

/**
* 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 @@ -398,7 +392,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 @@ -185,19 +182,16 @@ 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);
}

/**
* 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 @@ -344,32 +338,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 @@ -399,27 +375,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 @@ -490,7 +452,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 @@ -183,19 +180,16 @@ 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);
}

/**
* 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 @@ -398,7 +392,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 084577d

Please sign in to comment.