Skip to content

(CU-86b3verm1) Code clean up #228

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 24 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
7c883b4
(CU-86b4upx87) Fix SRU logic for codegen (#240)
ptorres-prowide May 5, 2025
5ab934a
chore: deprecation phase update to SRU2026
zubri May 5, 2025
42559c7
chore: gradle update
zubri May 5, 2025
b0fda3d
chore: gradle update
zubri May 5, 2025
cb42d92
chore: deprecation phase
zubri May 5, 2025
09e9b14
chore: snapshot version
zubri May 5, 2025
2ef18e5
chore: MT codegen fixes for SRU2025
zubri May 5, 2025
809b254
chore: rollback test implementation dependencies removal
zubri May 5, 2025
e61756a
chore: gson update
zubri May 5, 2025
c9e5437
chore: plugin updates
zubri May 5, 2025
d9a401d
chore: MT567 schema fix for SRU2025
ecalchemy May 9, 2025
289efdc
fix: narrative resolver for field 70
zubri May 14, 2025
cdd1fdb
Merge remote-tracking branch 'origin/SRU2025' into SRU2025
zubri May 14, 2025
9dc677a
fix: clean trailing slashes when parsing a field narrative with format 8
zubri May 15, 2025
47f33aa
Bump org.junit.jupiter:junit-jupiter from 5.11.4 to 5.12.2 (#236)
dependabot[bot] May 27, 2025
78f3d02
chore: add junit launcher (required by Gradle)
zubri May 27, 2025
d6cedf8
(PW-2371) Add UETR property in AbstractSwfitMessage (#243)
fernando-prowide May 27, 2025
e946992
Merge branch 'main' into SRU2025
zubri May 28, 2025
f9ad7e7
chore: release
zubri May 28, 2025
1dc25b8
chore: release
zubri May 28, 2025
1f96ec0
feat: constants update
zubri May 28, 2025
2779c74
chore: fix axion release conf for new plugin version
zubri May 28, 2025
50f5708
Merge branch 'main' into SRU2025
zubri Jun 4, 2025
41495f4
CU-86b3verm1_Code-cleanupimprovement
ptorres-prowide Feb 7, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
10 changes: 9 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
# Prowide Core - CHANGELOG

#### 10.2.7 - May 2025
#### 10.3.1 - SNAPSHOT
* (PW-2055) Fixed the default message metadata extraction for ACK/NAK to set the service message block 1 BIC as receiver, not as sender
* (PW-2055) Enhanced the `SwiftMessageUtils` extractors to support the service 21 message type (ACK/NAK)

#### 10.3.0 - May 2025
* SWIFT Standard release update 2025 (live 22 November 2025)
* Yearly revision of the deprecation phase (see https://dev.prowidesoftware.com/SRU2024/getting-started/deprecation/)
* Dependency update: commons-lang3 -> 3.17.0
* Dependency update: gson -> 2.13.1
* Changed field 70 narrative resolver to use the free format parser, code/narrative appearing anywhere, not just at the beginning of a line
* (PW-2371) Added a `uetr` field in the `AbstractSwiftMessage` to store the message's unique end-to-end transaction reference (UETR)

#### 10.2.6 - April 2025
* (CU-86b49rvw4) Updated label for Fields 14[P,Q,R]/16W/29[Q,W]
* (PW-2239) BIC Branch check for all upper and lower case
Expand Down
22 changes: 12 additions & 10 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ buildscript {
gradlePluginPortal()
}
dependencies {
classpath 'ru.vyarus:gradle-quality-plugin:4.9.0'
classpath 'pl.allegro.tech.build:axion-release-plugin:1.15.1'
classpath 'io.github.gradle-nexus:publish-plugin:1.3.0'
classpath 'com.diffplug.spotless:spotless-plugin-gradle:6.23.3'
classpath 'ru.vyarus:gradle-quality-plugin:5.0.0'
classpath 'pl.allegro.tech.build:axion-release-plugin:1.18.18'
classpath 'io.github.gradle-nexus:publish-plugin:2.0.0'
classpath 'com.diffplug.spotless:spotless-plugin-gradle:7.0.3'
}
}
apply plugin: 'pl.allegro.tech.build.axion-release'
Expand All @@ -24,17 +24,18 @@ archivesBaseName = 'pw-swift-core'
group 'com.prowidesoftware'

project.ext {
SRU = 'SRU2024'
SRU = 'SRU2025'
}

scmVersion {
versionCreator('simple')
tag {
prefix.set("${SRU}")
versionSeparator.set('-')
prefix = SRU
versionSeparator = '-'
}
}
project.version = "${SRU}-${scmVersion.version}"
//project.version = "${SRU}-9.5.0"
//project.version = "SRU2025-10.3.0"

java {
toolchain {
Expand All @@ -55,7 +56,7 @@ repositories {

dependencies {
implementation 'org.apache.commons:commons-lang3:3.17.0'
implementation 'com.google.code.gson:gson:2.11.0'
implementation 'com.google.code.gson:gson:2.13.1'

// jakarta is only used for annotations, we do not add it as implementation dependency on purpose to avoid forcing
// users to use jakarta jars in their project when they might not even be using JPA or JAXB at all
Expand All @@ -65,7 +66,8 @@ dependencies {

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.11.4'
testImplementation 'org.junit.jupiter:junit-jupiter:5.12.2'
testImplementation 'org.junit.platform:junit-platform-launcher:1.12.2'
testImplementation 'org.assertj:assertj-core:3.27.2'
testImplementation 'org.xmlunit:xmlunit-core:2.10.0'
testImplementation 'org.xmlunit:xmlunit-matchers:2.10.0'
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
3 changes: 2 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
33 changes: 20 additions & 13 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0
#

##############################################################################
#
Expand Down Expand Up @@ -55,7 +57,7 @@
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
Expand Down Expand Up @@ -83,10 +85,8 @@ done
# This is normally unused
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit

# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
Expand Down Expand Up @@ -133,26 +133,29 @@ location of your Java installation."
fi
else
JAVACMD=java
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
if ! command -v java >/dev/null 2>&1
then
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.

Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
fi

# Increase the maximum file descriptors if we can.
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
# shellcheck disable=SC2039,SC3045
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
case $MAX_FD in #(
'' | soft) :;; #(
*)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
# shellcheck disable=SC2039,SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
Expand Down Expand Up @@ -197,11 +200,15 @@ if "$cygwin" || "$msys" ; then
done
fi

# Collect all arguments for the java command;
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
# shell script including quotes and variable substitutions, so put them in
# double quotes to make sure that they get re-expanded; and
# * put everything else in single quotes, so that it's not re-expanded.

# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'

# Collect all arguments for the java command:
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
# and any embedded shellness will be escaped.
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
# treated as '${Hostname}' itself on the command line.

set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \
Expand Down
22 changes: 12 additions & 10 deletions gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@rem SPDX-License-Identifier: Apache-2.0
@rem

@if "%DEBUG%"=="" @echo off
@rem ##########################################################################
Expand Down Expand Up @@ -43,11 +45,11 @@ set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if %ERRORLEVEL% equ 0 goto execute

echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
echo. 1>&2
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2
Comment on lines +48 to +52
Copy link
Preview

Copilot AI Jun 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] Multiple echo lines are each redirected with 1>&2; consider grouping the error block or using echo >&2 "message" for clearer stderr redirection.

Suggested change
echo. 1>&2
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2
echo >&2 "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH."
echo >&2 "Please set the JAVA_HOME variable in your environment to match the location of your Java installation."

Copilot uses AI. Check for mistakes.


goto fail

Expand All @@ -57,11 +59,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe

if exist "%JAVA_EXE%" goto execute

echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
echo. 1>&2
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2

goto fail

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ public interface SchemeConstantsA {
String AREV = "AREV";
String ACCTINFO = "ACCTINFO";
String ACIN = "ACIN";
String ACPL = "ACPL";
String ATAX = "ATAX";
String AFFB = "AFFB";
String ADSR = "ADSR";
Expand Down Expand Up @@ -135,7 +136,6 @@ public interface SchemeConstantsA {
String ACCU = "ACCU";
String ACLA = "ACLA";
String ACLI = "ACLI";
String ACPL = "ACPL";
String ACPR = "ACPR";
String ACTU = "ACTU";
String ACUS = "ACUS";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ public interface SchemeConstantsB {
String BPAR = "BPAR";
String BREF = "BREF";
String BENE = "BENE";
String BCCW = "BCCW";
String BRCR = "BRCR";
String BUYR = "BUYR";
String BASK = "BASK";
Expand Down Expand Up @@ -69,7 +70,6 @@ public interface SchemeConstantsB {
String BBAA = "BBAA";
String BCBL = "BCBL";
String BCBN = "BCBN";
String BCCW = "BCCW";
String BCFD = "BCFD";
String BCPD = "BCPD";
String BCRO = "BCRO";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,12 @@ public interface SchemeConstantsD {
String DCSD = "DCSD";
String DACO = "DACO";
String DENC = "DENC";
String DOCD = "DOCD";
String DIVR = "DIVR";
String DVCP = "DVCP";
String DERY = "DERY";
String DROP = "DROP";
String DTCH = "DTCH";
String DEDI = "DEDI";
String DSPL = "DSPL";
String DEVI = "DEVI";
Expand Down Expand Up @@ -133,7 +135,6 @@ public interface SchemeConstantsD {
String DNIN = "DNIN";
String DNRE = "DNRE";
String DOCC = "DOCC";
String DOCD = "DOCD";
String DOCY = "DOCY";
String DONE = "DONE";
String DONF = "DONF";
Expand All @@ -149,7 +150,6 @@ public interface SchemeConstantsD {
String DSCL = "DSCL";
String DSEC = "DSEC";
String DSET = "DSET";
String DTCH = "DTCH";
String DTRA = "DTRA";
String DTRD = "DTRD";
String DUEB = "DUEB";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,10 @@ public interface SchemeConstantsF {
String FOLQ = "FOLQ";
String FLFR = "FLFR";
String FISC = "FISC";
String FITY = "FITY";
String FBIP = "FBIP";
String FXDT = "FXDT";
String FORI = "FORI";
String FDAT = "FDAT";
String FTCA = "FTCA";
String FILL = "FILL";
Expand Down Expand Up @@ -96,7 +98,6 @@ public interface SchemeConstantsF {
String FIMY = "FIMY";
String FINA = "FINA";
String FINL = "FINL";
String FITY = "FITY";
String FIXE = "FIXE";
String FIXI = "FIXI";
String FIXT = "FIXT";
Expand All @@ -106,7 +107,6 @@ public interface SchemeConstantsF {
String FOEX = "FOEX";
String FOGU = "FOGU";
String FOPT = "FOPT";
String FORI = "FORI";
String FORW = "FORW";
String FORX = "FORX";
String FPOO = "FPOO";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ public interface SchemeConstantsN {
String NESP = "NESP";
String NCOM = "NCOM";
String NBON = "NBON";
String NTWK = "NTWK";
String NTWKFEE = "NTWKFEE";
String NBLT = "NBLT";
String NDOM = "NDOM";
String NPLI = "NPLI";
Expand Down Expand Up @@ -147,8 +149,6 @@ public interface SchemeConstantsN {
String NSTP = "NSTP";
String NSYN = "NSYN";
String NTBK = "NTBK";
String NTWK = "NTWK";
String NTWKFEE = "NTWKFEE";
String NUND = "NUND";

}
Original file line number Diff line number Diff line change
Expand Up @@ -102,13 +102,15 @@ public interface SchemeConstantsP {
String PAYA = "PAYA";
String PPDT = "PPDT";
String PODT = "PODT";
String PRMN = "PRMN";
String PROR = "PROR";
String PSAG = "PSAG";
String PTSC = "PTSC";
String PROD = "PROD";
String PAMM = "PAMM";
String PRPP = "PRPP";
String PLDT = "PLDT";
String PRCM = "PRCM";
String PARL = "PARL";
String PTBA = "PTBA";
String PORT = "PORT";
Expand Down Expand Up @@ -174,7 +176,6 @@ public interface SchemeConstantsP {
String PRII = "PRII";
String PRIM = "PRIM";
String PRIO = "PRIO";
String PRMN = "PRMN";
String PROF = "PROF";
String PROV = "PROV";
String PROX = "PROX";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ public interface SchemeConstantsT {
String TAPC = "TAPC";
String TRAX = "TRAX";
String TRRE = "TRRE";
String TAXE = "TAXE";
String TRTE = "TRTE";
String TRCN = "TRCN";
String TRTR = "TRTR";
Expand All @@ -49,6 +48,7 @@ public interface SchemeConstantsT {
String TYCO = "TYCO";
String TEXA = "TEXA";
String TCRL = "TCRL";
String TAXE = "TAXE";
String TEXP = "TEXP";
String TRRF = "TRRF";
String TPOU = "TPOU";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2006-2024 Prowide
* Copyright 2006-2025 Prowide
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -54,15 +54,15 @@
* </ul>
*
* <p>
* This class complies with standard release <strong>SRU2024</strong>
* This class complies with standard release <strong>SRU2025</strong>
*/
@SuppressWarnings("unused")
@Generated
public class Field101 extends Field implements Serializable {
/**
* Constant identifying the SRU to which this class belongs to.
*/
public static final int SRU = 2024;
public static final int SRU = 2025;

private static final long serialVersionUID = 1L;
/**
Expand Down
Loading
Loading