Skip to content

Commit e1d097c

Browse files
committed
chore: dependencies update and deprecation phase review
1 parent 2fa3f48 commit e1d097c

17 files changed

+54
-348
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Prowide ISO 20022 - CHANGELOG
22

3+
#### 10.3.0 - SNAPSHOT
4+
* SWIFT Standard release update 2025 (live 22 November 2025)
5+
* Yearly revision of deprecation phase (see https://dev.prowidesoftware.com/SRU2024/getting-started/deprecation/)
6+
* Dependency update: commons-lang3 -> 3.17.0
7+
* Dependency update: gson -> 2.13.1
8+
39
#### 10.2.7 - April 2025
410
* Enhanced the MX parser log verbosity when parsing malformed content
511
* Added new logic to MxNode to removing all leaves with empty attributes and empty content

build.gradle

Lines changed: 21 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ buildscript {
55
}
66
dependencies {
77
classpath 'ru.vyarus:gradle-quality-plugin:5.0.0'
8-
classpath 'pl.allegro.tech.build:axion-release-plugin:1.15.1'
8+
classpath 'pl.allegro.tech.build:axion-release-plugin:1.18.18'
99
classpath 'io.github.gradle-nexus:publish-plugin:2.0.0'
10-
classpath 'com.diffplug.spotless:spotless-plugin-gradle:6.23.3'
10+
classpath 'com.diffplug.spotless:spotless-plugin-gradle:7.0.3'
1111
}
1212
}
1313
apply plugin: 'pl.allegro.tech.build.axion-release'
@@ -23,8 +23,12 @@ archivesBaseName = 'pw-iso20022'
2323
group 'com.prowidesoftware'
2424

2525
project.ext {
26-
SRU = 'SRU2024'
27-
prowideCoreVersion = 'SRU2024-10.2.6'
26+
SRU = 'SRU2025'
27+
prowideCoreVersion = 'SRU2025-10.3.0-SNAPSHOT'
28+
commonsLangVersion = '3.17.0'
29+
gsonVersion = '2.13.1'
30+
jaxbVersion = '4.0.5'
31+
jakartaPersistenceVersion = '3.1.0' // jakarta 3.1 is Jakarta EE 10, jakarta 3.2 would imply migration to Jakarta EE 11
2832
}
2933

3034
scmVersion {
@@ -34,6 +38,7 @@ scmVersion {
3438
}
3539
}
3640
project.version = "${SRU}-${scmVersion.version}"
41+
project.version = "SRU2025-10.3.0-SNAPSHOT"
3742

3843
allprojects {
3944

@@ -101,9 +106,9 @@ subprojects {
101106
version = rootProject.version
102107

103108
dependencies {
104-
implementation 'org.apache.commons:commons-lang3:3.17.0'
105-
implementation 'com.google.code.gson:gson:2.11.0'
106-
implementation 'com.sun.xml.bind:jaxb-impl:4.0.5'
109+
implementation "org.apache.commons:commons-lang3:${commonsLangVersion}"
110+
implementation "com.google.code.gson:gson:${gsonVersion}"
111+
implementation "com.sun.xml.bind:jaxb-impl:${jaxbVersion}"
107112
// bind-api is included transitively by jaxb-impl
108113
// implementation 'jakarta.xml.bind:jakarta.xml.bind-api:4.0.2'
109114
}
@@ -127,14 +132,14 @@ configure(subprojects.findAll {it.name.endsWith('-mx')}) {
127132
api project(':iso20022-core')
128133
implementation project(specificTypesProject)
129134

130-
implementation 'org.apache.commons:commons-lang3:3.17.0'
131-
implementation 'com.google.code.gson:gson:2.11.0'
135+
implementation "org.apache.commons:commons-lang3:${commonsLangVersion}"
136+
implementation "com.google.code.gson:gson:${gsonVersion}"
132137

133-
implementation 'com.sun.xml.bind:jaxb-impl:4.0.5'
138+
implementation "com.sun.xml.bind:jaxb-impl:${jaxbVersion}"
134139
// bind-api is included transitively by jaxb-impl
135140
// implementation 'jakarta.xml.bind:jakarta.xml.bind-api:4.0.2'
136141

137-
compileOnly 'javax.persistence:javax.persistence-api:2.2'
142+
compileOnly "jakarta.persistence:jakarta.persistence-api:${jakartaPersistenceVersion}"
138143
}
139144
}
140145

@@ -150,13 +155,13 @@ project(':iso20022-core') {
150155
// included build
151156
api "com.prowidesoftware:pw-swift-core:${prowideCoreVersion}"
152157

153-
implementation 'org.apache.commons:commons-lang3:3.17.0'
154-
implementation 'com.google.code.gson:gson:2.11.0'
158+
implementation "org.apache.commons:commons-lang3:${commonsLangVersion}"
159+
implementation "com.google.code.gson:gson:${gsonVersion}"
155160

156-
compileOnly 'jakarta.persistence:jakarta.persistence-api:3.1.0'
157-
compileOnly 'jakarta.validation:jakarta.validation-api:3.0.2'
161+
compileOnly "jakarta.persistence:jakarta.persistence-api:${jakartaPersistenceVersion}"
162+
compileOnly 'jakarta.validation:jakarta.validation-api:3.1.0'
158163

159-
testImplementation 'jakarta.persistence:jakarta.persistence-api:3.1.0'
164+
testImplementation "jakarta.persistence:jakarta.persistence-api:${jakartaPersistenceVersion}"
160165
testImplementation 'org.junit.jupiter:junit-jupiter:5.11.4'
161166
testImplementation 'com.google.guava:guava:33.4.0-jre'
162167
testImplementation 'org.assertj:assertj-core:3.27.2'
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14-bin.zip
44
networkTimeout=10000
5+
validateDistributionUrl=true
56
zipStoreBase=GRADLE_USER_HOME
67
zipStorePath=wrapper/dists

iso20022-core/src/main/java/com/prowidesoftware/swift/model/MxBusinessProcess.java

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,6 @@
1515
*/
1616
package com.prowidesoftware.swift.model;
1717

18-
import com.prowidesoftware.deprecation.ProwideDeprecated;
19-
import com.prowidesoftware.deprecation.TargetYear;
20-
2118
/**
2219
* SWIFT business process classification for MX messages.
2320
*
@@ -57,14 +54,6 @@ public enum MxBusinessProcess {
5754
setr("Securities Trade"),
5855
supl("Supplementary Data"),
5956
trck("Payments Tracker"),
60-
61-
/**
62-
* @deprecated Obsolete to be withdrawn (non-ISO)
63-
*/
64-
@ProwideDeprecated(phase4 = TargetYear.SRU2025)
65-
@Deprecated
66-
trea("Treasury"),
67-
6857
tsin("Trade Services Initiation"),
6958
tsmt("Trade Services Management"),
7059
tsrv("Trade Services"),

iso20022-core/src/main/java/com/prowidesoftware/swift/model/mx/AbstractMX.java

Lines changed: 2 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
import com.google.gson.Gson;
1919
import com.google.gson.GsonBuilder;
2020
import com.prowidesoftware.JsonSerializable;
21-
import com.prowidesoftware.deprecation.DeprecationUtils;
2221
import com.prowidesoftware.deprecation.ProwideDeprecated;
2322
import com.prowidesoftware.deprecation.TargetYear;
2423
import com.prowidesoftware.swift.model.AbstractMessage;
@@ -27,11 +26,9 @@
2726
import com.prowidesoftware.swift.model.mt.AbstractMT;
2827
import com.prowidesoftware.swift.model.mx.adapters.*;
2928
import com.prowidesoftware.swift.model.mx.adapters.v9.V9DateTimeJsonAdapter;
30-
import com.prowidesoftware.swift.utils.Lib;
3129
import jakarta.xml.bind.JAXBContext;
3230
import jakarta.xml.bind.annotation.XmlTransient;
33-
import java.io.*;
34-
import java.nio.charset.StandardCharsets;
31+
import java.io.StringReader;
3532
import java.time.*;
3633
import java.util.ArrayList;
3734
import java.util.List;
@@ -73,7 +70,7 @@ public abstract class AbstractMX extends AbstractMessage implements JsonSerializ
7370
* @deprecated the default root element for the custom envelope is now defined in {@link EnvelopeType#CUSTOM}
7471
*/
7572
@Deprecated
76-
@ProwideDeprecated(phase2 = TargetYear.SRU2025)
73+
@ProwideDeprecated(phase3 = TargetYear.SRU2026)
7774
public static String DEFAULT_ROOT_ELEMENT = "RequestPayload";
7875

7976
/**
@@ -129,17 +126,6 @@ public static AbstractMX parse(final String xml, MxId id) {
129126
return MxReadImpl.parse(xml, id, new MxReadParams());
130127
}
131128

132-
/**
133-
* @deprecated use Lib.readFile(file) and any parse from String method
134-
*/
135-
@Deprecated
136-
@ProwideDeprecated(phase4 = TargetYear.SRU2025)
137-
public static AbstractMX parse(final File file, MxId id) throws IOException {
138-
DeprecationUtils.phase3(
139-
AbstractMX.class, "parse(File, MxId)", "Use Lib.readFile(file) and any parse from String method");
140-
return MxReadImpl.parse(Lib.readFile(file), id, new MxReadParams());
141-
}
142-
143129
/**
144130
* Parses the XML Element into a specific MX object.
145131
* The Mx to create is detected from the namespace.
@@ -412,21 +398,6 @@ public String document() {
412398
return document(params);
413399
}
414400

415-
/**
416-
* @deprecated use {@link #document(MxWriteParams)} instead
417-
*/
418-
@Deprecated
419-
@ProwideDeprecated(phase4 = TargetYear.SRU2025)
420-
public String document(final String prefix, boolean includeXMLDeclaration, EscapeHandler escapeHandler) {
421-
DeprecationUtils.phase3(
422-
AbstractMX.class, "document(String, boolean, EscapeHandler)", "Use document(MxWriteParams) instead");
423-
MxWriteParams params = new MxWriteParams();
424-
params.prefix = prefix;
425-
params.includeXMLDeclaration = includeXMLDeclaration;
426-
params.escapeHandler = escapeHandler;
427-
return document(params);
428-
}
429-
430401
/**
431402
* Convenience method to get this message XML as javax.xml.transform.Source.
432403
*
@@ -460,34 +431,6 @@ public String message() {
460431
return message(new MxWriteConfiguration());
461432
}
462433

463-
/**
464-
* @deprecated use {@link #message(MxWriteConfiguration)} and handle write from String to file with plain Java API
465-
*/
466-
@Deprecated
467-
@ProwideDeprecated(phase4 = TargetYear.SRU2025)
468-
public void write(final File file) throws IOException {
469-
DeprecationUtils.phase3(AbstractMX.class, "write(File)", "Use message(MxWriteConfiguration) instead");
470-
Objects.requireNonNull(file, "the file to write cannot be null");
471-
boolean created = file.createNewFile();
472-
if (created) {
473-
log.fine("new file created: " + file.getAbsolutePath());
474-
}
475-
final FileOutputStream stream = new FileOutputStream(file.getAbsoluteFile());
476-
write(stream);
477-
stream.close();
478-
}
479-
480-
/**
481-
* @deprecated use {@link #message(MxWriteConfiguration)} and handle write from String to stream with plain Java API
482-
*/
483-
@Deprecated
484-
@ProwideDeprecated(phase4 = TargetYear.SRU2025)
485-
public void write(final OutputStream stream) throws IOException {
486-
DeprecationUtils.phase3(AbstractMX.class, "write(OutputStream)", "Use message(MxWriteConfiguration) instead");
487-
Objects.requireNonNull(stream, "the stream to write cannot be null");
488-
stream.write(message().getBytes(StandardCharsets.UTF_8));
489-
}
490-
491434
/**
492435
* @return the business header or null if not set
493436
* @since 9.0.1

iso20022-core/src/main/java/com/prowidesoftware/swift/model/mx/AppHdr.java

Lines changed: 1 addition & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,7 @@
1515
*/
1616
package com.prowidesoftware.swift.model.mx;
1717

18-
import com.prowidesoftware.deprecation.DeprecationUtils;
19-
import com.prowidesoftware.deprecation.ProwideDeprecated;
20-
import com.prowidesoftware.deprecation.TargetYear;
2118
import java.time.OffsetDateTime;
22-
import java.util.Objects;
2319
import org.w3c.dom.Element;
2420

2521
/**
@@ -106,13 +102,6 @@ public interface AppHdr {
106102
*/
107103
void setCreationDate(boolean overwrite);
108104

109-
/*
110-
* ver MX Headers/stdsmx_usgi.pdf
111-
* doc 3.2.3 Correspondence between the ISO Business Application Header and the Application Header
112-
* de ahi sintentizar los atributos aca.
113-
* replicar metodos unificados segun el mapeo de la seccion 3.2.3
114-
*/
115-
116105
/**
117106
* Get this header as an XML string.
118107
* <p>The implementation uses {@link #xml(MxWriteParams)} with no prefix and no XML declaration.
@@ -123,35 +112,14 @@ default String xml() {
123112
return xml(new MxWriteParams());
124113
}
125114

126-
/**
127-
* @deprecated use {@link #xml(MxWriteParams)} instead
128-
*/
129-
@Deprecated
130-
@ProwideDeprecated(phase4 = TargetYear.SRU2025)
131-
String xml(final String prefix, boolean includeXMLDeclaration);
132-
133-
/**
134-
* @deprecated use {@link #xml(MxWriteParams)} instead
135-
*/
136-
@Deprecated
137-
@ProwideDeprecated(phase4 = TargetYear.SRU2025)
138-
default String xml(final String prefix, boolean includeXMLDeclaration, EscapeHandler escapeHandler) {
139-
DeprecationUtils.phase3(
140-
AbstractMX.class, "xml(String, boolean, EscapeHandler)", "Use xml(MxWriteParams) instead");
141-
return xml(prefix, includeXMLDeclaration);
142-
}
143-
144115
/**
145116
* Get this header as an XML string.
146117
*
147118
* @param params not null marshalling parameters
148119
* @return header serialized into XML string or null in case of unexpected error
149120
* @since 9.2.6
150121
*/
151-
default String xml(MxWriteParams params) {
152-
Objects.requireNonNull(params, "The marshalling params cannot be null");
153-
return xml(params.prefix, params.includeXMLDeclaration);
154-
}
122+
String xml(MxWriteParams params);
155123

156124
/**
157125
* Gets the header as an Element object.

iso20022-core/src/main/java/com/prowidesoftware/swift/model/mx/AppHdrParser.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,7 @@ public static Optional<AppHdr> parse(final String xml, MxReadParams params) {
5858

5959
Optional<String> namespace = NamespaceReader.findAppHdrNamespace(xml);
6060

61-
boolean headerIsPresent =
62-
namespace.isPresent() || NamespaceReader.elementExists(xml, AppHdr.HEADER_LOCALNAME);
61+
boolean headerIsPresent = namespace.isPresent() || MxParseUtils.elementExists(xml, AppHdr.HEADER_LOCALNAME);
6362

6463
if (headerIsPresent) {
6564
AppHdr parsedHeader = parseHeaderFromSAXSource(xml, namespace.orElse(null), params);

iso20022-core/src/main/java/com/prowidesoftware/swift/model/mx/BusinessAppHdrV01.java

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,6 @@
1616
package com.prowidesoftware.swift.model.mx;
1717

1818
import com.prowidesoftware.ProwideException;
19-
import com.prowidesoftware.deprecation.DeprecationUtils;
20-
import com.prowidesoftware.deprecation.ProwideDeprecated;
21-
import com.prowidesoftware.deprecation.TargetYear;
2219
import com.prowidesoftware.swift.model.mx.adapters.IsoDateTimeAdapter;
2320
import com.prowidesoftware.swift.model.mx.adapters.ZuluOffsetDateTimeAdapter;
2421
import com.prowidesoftware.swift.model.mx.dic.BusinessApplicationHeaderV01Impl;
@@ -188,36 +185,6 @@ public void setCreationDate(boolean overwrite) {
188185
}
189186
}
190187

191-
/**
192-
* @deprecated use {@link #xml(MxWriteParams)} instead
193-
*/
194-
@Deprecated
195-
@ProwideDeprecated(phase4 = TargetYear.SRU2025)
196-
@Override
197-
public String xml(final String prefix, boolean includeXMLDeclaration) {
198-
DeprecationUtils.phase3(AbstractMX.class, "xml(String, boolean)", "Use xml(MxWriteParams) instead");
199-
MxWriteParams params = new MxWriteParams();
200-
params.prefix = prefix;
201-
params.includeXMLDeclaration = includeXMLDeclaration;
202-
return xml(params);
203-
}
204-
205-
/**
206-
* @deprecated use {@link #xml(MxWriteParams)} instead
207-
*/
208-
@Deprecated
209-
@ProwideDeprecated(phase4 = TargetYear.SRU2025)
210-
@Override
211-
public String xml(String prefix, boolean includeXMLDeclaration, EscapeHandler escapeHandler) {
212-
DeprecationUtils.phase3(
213-
AbstractMX.class, "xml(String, boolean, EscapeHandler) ", "Use xml(MxWriteParams) instead");
214-
MxWriteParams params = new MxWriteParams();
215-
params.prefix = prefix;
216-
params.includeXMLDeclaration = includeXMLDeclaration;
217-
params.escapeHandler = escapeHandler;
218-
return xml(params);
219-
}
220-
221188
@Override
222189
public String xml(MxWriteParams params) {
223190
try {

0 commit comments

Comments
 (0)