Skip to content
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

SRU2023 v10.1 #85

Open
wants to merge 48 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
41a8b2a
update build, changelog and readme
zubri Jun 5, 2023
f6c3916
Default JSON structure with GSON and java.time.* classes + JUnit.
fernando-prowide May 9, 2023
f8d27da
JUnits YearMonthAdapter
fernando-prowide May 9, 2023
42ae48f
minor changes, javadoc and formatting
zubri May 9, 2023
7a7b3fe
Merge pull request #81 from prowide/CU-2np2uh3_GH-56--JAXB-Upgrade-Pl…
zubri May 9, 2023
180a9db
Fix Junit + Remove static of DateTimeFormatter fields in Adapters
fernando-prowide May 11, 2023
3365f3d
Junit Year + Fix DateTimeFormatter pattern for Year fields.
fernando-prowide May 11, 2023
b2834db
Add Junit custom format Year
fernando-prowide May 12, 2023
a9241f2
WIP Add Junit LocalDate
fernando-prowide May 15, 2023
dea1b04
Add Junit + Fix pattern unmarshalFormat of OffsetTimeAdapter
fernando-prowide May 15, 2023
e402d4e
java 11
zubri Jun 5, 2023
e210ed7
full SRU2023 codegen for jakarta + merge compile fixes
zubri Jun 6, 2023
4e6a4a4
full SRU2023 codegen with jakarta (modified files)
zubri Jun 6, 2023
0e67b9c
fix headers API timezone (UTC for BAH v01)
zubri Jun 9, 2023
70ca19f
Enhanced the OffsetDateTimeAdapter and OffsetTimeAdapter to support v…
zubri Jun 10, 2023
6861c53
Make the default IsoDateAdapter more flexible by ignoring the offset …
zubri Jun 12, 2023
997b7e0
Merge branch 'SRU2023' into SRU2023_v10
zubri Jun 14, 2023
2bad01d
SRU2022_v10: Fix GSON DateTime relfection issue (#88)
fernando-prowide Jun 14, 2023
d25c9f9
release
zubri Jun 14, 2023
f756ac5
Merge branch 'SRU2023' into SRU2023_v10
zubri Jun 27, 2023
e79d7d6
release
zubri Jul 1, 2023
83aab22
gradle fix
zubri Jul 1, 2023
fd594dc
Merge branch 'SRU2023' into SRU2023_v10
zubri Jul 24, 2023
fd6b0d4
spotless formatting
zubri Aug 4, 2023
f93b1a7
Merge remote-tracking branch 'origin/SRU2023' into SRU2023_v10
zubri Aug 4, 2023
543017e
prowide core update
zubri Aug 4, 2023
1aac9ca
PW-1566: Fix marshalling mx message with nanoseconds 000 SRU2023 v10 …
fernando-prowide Aug 22, 2023
4cf7bdc
PW-1566--Fix-marshalling-MX-message-with-nano (#102)
zubri Aug 23, 2023
063c7d0
Merge branch 'SRU2023' into SRU2023_v10
zubri Aug 26, 2023
e07498b
release
zubri Aug 26, 2023
1e46c80
fixed test
zubri Aug 28, 2023
974d32b
prowide core update
zubri Sep 21, 2023
210edbc
Merge branch 'SRU2023' into SRU2023_v10
zubri Sep 21, 2023
4b52fa5
prowide core update
zubri Sep 22, 2023
6e0df47
test case with custom adapter
zubri Sep 26, 2023
756c64d
build fix for multiples prowide repos
zubri Sep 26, 2023
1ee7a31
Merge branch 'SRU2023' into SRU2023_v10
zubri Oct 16, 2023
c2f286b
Merge branch 'develop' into SRU2023_v10
zubri Nov 22, 2023
952f49d
update gradle to 8.5 and update all plugins to latest versions
zubri Dec 14, 2023
926a2cd
Merge branch 'develop' into SRU2023_v10
zubri Jan 17, 2024
a628df2
typo
zubri Jan 17, 2024
f34c719
Update jaxb dependency from com.sun.xml.bind:jaxb-impl:4.0.2 to 4.0.5…
zubri Apr 18, 2024
b902944
update core dependency
zubri Apr 19, 2024
981b3df
release
zubri Apr 19, 2024
bb44696
Merge branch 'develop' into SRU2023_v10
zubri May 21, 2024
b10476c
fix Zulu adapter after merge
zubri May 21, 2024
8e4e55d
Merge remote-tracking branch 'origin/develop' into SRU2023_v10
zubri Jun 29, 2024
cf5c986
cherry pick changes from PR CU-86b1kajgv_PW-1958--NullPointerExceptio…
zubri Aug 14, 2024
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
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,6 @@ lib
.idea/jpa-buddy.xml
release.sh
.idea/sonarlint
.java-version
*.hprof
.idea/copilot
2 changes: 1 addition & 1 deletion .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

29 changes: 20 additions & 9 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,39 @@
# Prowide ISO 20022 - CHANGELOG

#### 9.4.6 - May 2024
* (PW-1875) Fixed the `ZuluDateTimeAdapter` to convert the datetime to UTC offset if needed
#### 9.4.5 - May 2024
#### 10.1.7 - August 2024
Copy link

Choose a reason for hiding this comment

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

Incorrect heading level.

The heading level should increment by one level at a time. Change the heading level from #### to ###.

-#### 10.1.7 - August 2024
+### 10.1.7 - August 2024
Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
#### 10.1.7 - August 2024
### 10.1.7 - August 2024
Tools
Markdownlint

3-3: Expected: h2; Actual: h4
Heading levels should only increment by one level at a time

(MD001, heading-increment)


3-3: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines

(MD022, blanks-around-headings)

* (PW-1958) Fixed the `DefaultMxMetadataStrategy` NPE issue when the amount values are null
Copy link

Choose a reason for hiding this comment

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

Unordered list indentation.

The list item is not properly indented. Ensure consistent indentation for unordered list items.

-  * (PW-1958) Fixed the `DefaultMxMetadataStrategy` NPE issue when the amount values are null
+* (PW-1958) Fixed the `DefaultMxMetadataStrategy` NPE issue when the amount values are null
Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
* (PW-1958) Fixed the `DefaultMxMetadataStrategy` NPE issue when the amount values are null
* (PW-1958) Fixed the `DefaultMxMetadataStrategy` NPE issue when the amount values are null
Tools
Markdownlint

4-4: Expected: 0; Actual: 2
Unordered list indentation

(MD007, ul-indent)


4-4: null
Lists should be surrounded by blank lines

(MD032, blanks-around-lists)


#### 10.1.6 - May 2024
Copy link

Choose a reason for hiding this comment

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

Missing blank line after heading.

Headings should be surrounded by blank lines for better readability.

-#### 10.1.6 - May 2024
+#### 10.1.6 - May 2024
Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
#### 10.1.6 - May 2024
#### 10.1.6 - May 2024
Tools
Markdownlint

6-6: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines

(MD022, blanks-around-headings)

* (PW-1875) Changed the BusinessApplicationHeaderV01 marshaller to always use Zulu timezone with "Z" indicator

#### 9.4.4 - January 2024

#### 10.1.5 - April 2024
* Update jaxb dependency from com.sun.xml.bind:jaxb-impl:4.0.2 to 4.0.5 containing several jaxb bugfixes

#### 10.1.4 - January 2024
* Enhanced the identifier extraction of the MxSwiftMessage to use the AppHdr when the Document namespace is missing
* Enhanced the generic AbstractMX#parse to detect the message type from the AppHdr when the Document namespace is missing
* Added default metadata extraction implementation for pacs and camt amounts and value dates
* Added default methods for sender, receiver, and identifier extraction to the MxSwiftMessage.
* Replaced the DistinguishedName parse logic with proprietary util class from the Prowide Core library

#### 9.4.3 - August 2023
#### 10.1.3 - August 2023
* (PW-1566) Fixed manipulation of nanoseconds in the OffsetTime and OffsetDateTime adapters
* Enhanced metadata extraction for xsys messages getting sender/receiver BICs from the RequestHeader element
* Make the message metadata extraction lenient, by fixing the XML instruction of the payload when it contains invalid case

#### 9.4.2 - July 2023
#### 10.1.2 - August 2023
* Added new utility class SupplementaryDataUtils to facilitate "SplmtryData" extraction from MX messages

#### 9.4.1 - June 2023
#### 10.1.1 - July 2023
* (PW-1392) Fixed the default escape handler when serializing model objects into XML, that was duplicated quote characters in the output

#### 10.1.0 - June 2023
* Migration to Java 11
* Migration to Jakarta EE 10
* XmlGregorianCalendar was replaced model-wide by the new java.time classes
* Fixed AppHdrFactory creation to use UTC in the header default creation date time
* Fixed the business application header V01 serialization to use Zulu time indicator instead of +00:00 offset

#### 9.4.0 - May 2023
* SWIFT Standard release update 2023 (live 19 November 2023)
* Yearly revision of deprecation phase (see https://dev.prowidesoftware.com/SRU2022/getting-started/deprecation/)
Expand Down
11 changes: 0 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,6 @@ Apache License 2.0

SWIFT is a trademark of S.W.I.F.T. SCRL. (www.swift.com)

### Dependencies

This project depends on https://github.com/prowide/prowide-core

The project also needs the **javax.xml.bind** in runtime. Until Java 8 this package is part of the JDK.
If you use **Java above 8** you might need to activate the required modules in the JDK; or add these dependencies (or an equivalent implementation) to your application:
```
implementation 'javax.xml.bind:jaxb-api:2.3.1'
implementation 'com.sun.xml.bind:jaxb-impl:2.3.3'
```

### Build

For better build performance, local configurations can be setup in a gradle.properties file such as:
Expand Down
79 changes: 58 additions & 21 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.7.0'
classpath 'pl.allegro.tech.build:axion-release-plugin:1.13.6'
classpath 'io.github.gradle-nexus:publish-plugin:1.1.0'
classpath 'com.diffplug.spotless:spotless-plugin-gradle:6.13.0' // above this version requires Java 11
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'
}
}
apply plugin: 'pl.allegro.tech.build.axion-release'
Expand Down Expand Up @@ -40,7 +40,7 @@ allprojects {
options.encoding = 'UTF-8'
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(8))
languageVersion.set(JavaLanguageVersion.of(11))
}
}
doLast {
Expand All @@ -60,6 +60,13 @@ allprojects {
username "${project.prowideRepoUser}"
password "${project.prowideRepoPass}"
}
}
maven {
url "${project.prowideRepo}/repository/maven-snapshots/"
credentials {
username "${project.prowideRepoUser}"
password "${project.prowideRepoPass}"
}
maven {
url "${project.prowideRepo}/repository/maven-snapshots/"
credentials {
Expand All @@ -71,7 +78,11 @@ allprojects {
}
}

sourceSets.main.java.srcDirs = ['src/main/java', 'src/generated/java']
sourceSets.named('main') {
java {
setSrcDirs(['src/main/java', 'src/generated/java'])
}
}

tasks.withType(Jar) {
manifest.attributes(
Expand All @@ -82,8 +93,8 @@ allprojects {
'Implementation-Version': project.version,
'Implementation-Vendor': 'www.prowidesoftware.com',
'Built-OS': System.getProperty('os.name'),
'Source-Compatibility': project.sourceCompatibility,
'Target-Compatibility': project.targetCompatibility,
'Source-Compatibility': JavaVersion.VERSION_11,
'Target-Compatibility': JavaVersion.VERSION_11,
'Built-Date': new Date().format("yyyy-MM-dd"),
'Automatic-Module-Name': 'com.prowidesoftware.iso20022'
)
Expand All @@ -98,6 +109,9 @@ subprojects {
dependencies {
implementation 'org.apache.commons:commons-lang3:3.12.0'
implementation 'com.google.code.gson:gson:2.9.0'
implementation 'com.sun.xml.bind:jaxb-impl:4.0.5'
// bind-api is included transitively by jaxb-impl
// implementation 'jakarta.xml.bind:jakarta.xml.bind-api:4.0.2'
}

tasks.withType(Jar) {
Expand All @@ -118,8 +132,14 @@ configure(subprojects.findAll {it.name.endsWith('-mx')}) {
dependencies {
api project(':iso20022-core')
implementation project(specificTypesProject)

implementation 'org.apache.commons:commons-lang3:3.12.0'
implementation 'com.google.code.gson:gson:2.9.0'

implementation 'com.sun.xml.bind:jaxb-impl:4.0.5'
// bind-api is included transitively by jaxb-impl
// implementation 'jakarta.xml.bind:jakarta.xml.bind-api:4.0.2'

compileOnly 'javax.persistence:javax.persistence-api:2.2'
}
}
Expand All @@ -134,15 +154,15 @@ configure(subprojects.findAll {it.name.endsWith('-mx')}) {
project(':iso20022-core') {
dependencies {
// included build
api 'com.prowidesoftware:pw-swift-core:SRU2023-9.4.16'
api 'com.prowidesoftware:pw-swift-core:SRU2023-10.1.15'

implementation 'org.apache.commons:commons-lang3:3.12.0'
implementation 'com.google.code.gson:gson:2.9.0'

compileOnly 'javax.persistence:javax.persistence-api:2.2'
compileOnly 'javax.validation:validation-api:2.0.1.Final'
compileOnly 'jakarta.persistence:jakarta.persistence-api:3.1.0'
Copy link

Choose a reason for hiding this comment

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

Tip

Codebase Verification

Ensure Complete Transition to Jakarta Persistence API

The build.gradle file still contains a reference to javax.persistence:javax.persistence-api:2.2. This indicates that the transition to jakarta.persistence might not be fully complete. Please review and update the build configuration to ensure consistency and compatibility with the Jakarta Persistence API.

  • Location: build.gradle
Analysis chain

Transition to Jakarta Persistence API: Ensure Compatibility.

The transition from javax.persistence to jakarta.persistence should be checked for compatibility. Ensure that all persistence-related code is updated accordingly.

Also applies to: 165-165

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify compatibility of the transition to `jakarta.persistence`.

# Test: Search for any `javax.persistence` usage that might need updating.
rg --type java 'javax\.persistence'

Length of output: 37


Script:

#!/bin/bash
# Description: Search for any `javax.persistence` references in XML configuration files or other build scripts.

# Search in XML files for `javax.persistence` usage.
rg --type xml 'javax\.persistence'

# Search in other Gradle build files for `javax.persistence` usage.
rg --type gradle 'javax\.persistence'

Length of output: 149

compileOnly 'jakarta.validation:jakarta.validation-api:3.0.2'

testImplementation 'javax.persistence:javax.persistence-api:2.2'
testImplementation 'jakarta.persistence:jakarta.persistence-api:3.1.0'
testImplementation('org.junit.jupiter:junit-jupiter:5.8.2')
testImplementation group: 'com.google.guava', name: 'guava', version: '31.1-jre'
testImplementation group: 'org.assertj', name: 'assertj-core', version: '3.22.0'
Expand Down Expand Up @@ -194,7 +214,11 @@ jar {
archivesBaseName = 'pw-iso20022'
subprojects.each { subproject ->
from subproject.configurations.archives.allArtifacts.files.collect {
zipTree(it)
// filter out any artifacts that are not jars
if (it.name.endsWith('.jar')) {
println "Adding ${it.name} to fat jar"
zipTree(it)
}
}
}
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
Expand Down Expand Up @@ -313,9 +337,22 @@ artifacts {
// declared dependencies for pom generation
dependencies {
// included build (keep in sync with the latest Prowide Core version)
api 'com.prowidesoftware:pw-swift-core:SRU2023-9.4.16'
implementation 'org.apache.commons:commons-lang3:3.12.0'
implementation 'com.google.code.gson:gson:2.9.0'

api 'com.prowidesoftware:pw-swift-core:SRU2023-10.1.15'

// included transitive dependencies from Prowide Core
//implementation 'org.apache.commons:commons-lang3:3.12.0'
//implementation 'com.google.code.gson:gson:2.9.0'

// jaxb is required because it is no longer included in the JDK
implementation 'com.sun.xml.bind:jaxb-impl:4.0.5'
// bind-api is included transitively by jaxb-impl
// implementation 'jakarta.xml.bind:jakarta.xml.bind-api:4.0.2'
}

project.ext {
// publishing repository
nexusRepo = project.version.endsWith('-SNAPSHOT') ? 'maven-snapshots' : 'maven-releases'
}

// repo for publishing
Expand Down Expand Up @@ -452,7 +489,7 @@ tasks.register('bundle', Jar) {
from ("$buildDir/libs") {
include '*.asc'
}
archiveName 'bundle.jar'
archiveFileName.set('bundle.jar')
}

tasks.withType(Test) {
Expand All @@ -461,15 +498,15 @@ tasks.withType(Test) {
}
}

task('testOn11', type: Test) {
task('testOn17', type: Test) {
javaLauncher = javaToolchains.launcherFor {
languageVersion = JavaLanguageVersion.of(11)
languageVersion = JavaLanguageVersion.of(17)
}
}

task('testOn17', type: Test) {
task('testOn19', type: Test) {
javaLauncher = javaToolchains.launcherFor {
languageVersion = JavaLanguageVersion.of(17)
languageVersion = JavaLanguageVersion.of(19)
}
}

Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.4-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.prowidesoftware.swift.model.mx.*;
import jakarta.persistence.*;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.util.Objects;
import java.util.Optional;
import javax.persistence.*;
import org.apache.commons.lang3.StringUtils;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,21 +25,18 @@
import com.prowidesoftware.swift.model.MessageStandardType;
import com.prowidesoftware.swift.model.MxId;
import com.prowidesoftware.swift.model.mt.AbstractMT;
import com.prowidesoftware.swift.model.mx.adapters.*;
import com.prowidesoftware.swift.utils.Lib;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.io.StringReader;
import jakarta.xml.bind.JAXBContext;
import jakarta.xml.bind.annotation.XmlTransient;
import java.io.*;
import java.nio.charset.StandardCharsets;
import java.time.*;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.xml.bind.JAXBContext;
import javax.xml.bind.annotation.XmlTransient;
import javax.xml.datatype.XMLGregorianCalendar;
import javax.xml.transform.Source;
import javax.xml.transform.dom.DOMResult;
import javax.xml.transform.stream.StreamSource;
Expand Down Expand Up @@ -263,11 +260,7 @@ public static AbstractMX parse(final String xml, MxId id, final MxReadConfigurat
* @since 7.10.3
*/
protected static <T> T fromJson(String json, Class<T> classOfT) {
final Gson gson = new GsonBuilder()
.registerTypeAdapter(AbstractMX.class, new AbstractMXAdapter())
.registerTypeAdapter(XMLGregorianCalendar.class, new XMLGregorianCalendarAdapter())
.registerTypeAdapter(AppHdr.class, new AppHdrAdapter())
.create();
final Gson gson = getGsonBuilderWithCustomAdapters();
return gson.fromJson(json, classOfT);
}

Expand All @@ -279,11 +272,7 @@ protected static <T> T fromJson(String json, Class<T> classOfT) {
* @since 7.10.3
*/
public static AbstractMX fromJson(String json) {
final Gson gson = new GsonBuilder()
.registerTypeAdapter(AbstractMX.class, new AbstractMXAdapter())
.registerTypeAdapter(XMLGregorianCalendar.class, new XMLGregorianCalendarAdapter())
.registerTypeAdapter(AppHdr.class, new AppHdrAdapter())
.create();
final Gson gson = getGsonBuilderWithCustomAdapters();
return gson.fromJson(json, AbstractMX.class);
}

Expand Down Expand Up @@ -638,14 +627,23 @@ public Element element(JAXBContext inputContext) {
*/
@Override
public String toJson() {
// we use AbstractMX and not this.getClass() in order to force usage of the adapter
final Gson gson = getGsonBuilderWithCustomAdapters();
return gson.toJson(this, AbstractMX.class);
}

private static Gson getGsonBuilderWithCustomAdapters() {
final Gson gson = new GsonBuilder()
.registerTypeAdapter(AbstractMX.class, new AbstractMXAdapter())
.registerTypeHierarchyAdapter(XMLGregorianCalendar.class, new XMLGregorianCalendarAdapter())
.registerTypeAdapter(OffsetDateTime.class, new OffsetDateTimeJsonAdapter())
.registerTypeAdapter(OffsetTime.class, new OffsetTimeJsonAdapter())
.registerTypeAdapter(LocalDate.class, new LocalDateJsonAdapter())
.registerTypeAdapter(Year.class, new YearJsonAdapter())
.registerTypeAdapter(YearMonth.class, new YearMonthJsonAdapter())
.registerTypeAdapter(AppHdr.class, new AppHdrAdapter())
.setPrettyPrinting()
.create();
// we use AbstractMX and not this.getClass() in order to force usage of the adapter
return gson.toJson(this, AbstractMX.class);
return gson;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ class AbstractMXAdapter implements JsonSerializer<AbstractMX>, JsonDeserializer<
@Override
public JsonElement serialize(final AbstractMX mx, Type type, final JsonSerializationContext context) {
// default serialization
// in Integrator this will fill the JSON structure with the complete MX message model
JsonObject object = context.serialize(mx).getAsJsonObject();
object.addProperty("@xmlns", mx.getNamespace());
object.addProperty(IDENTIFIER, mx.getMxId().id());
Expand All @@ -53,7 +52,7 @@ public AbstractMX deserialize(JsonElement json, Type typeOfT, JsonDeserializatio
}
MxId id = new MxId(prim.getAsString());

Class<?> klass = null;
Class<?> klass;
try {
String className = "com.prowidesoftware.swift.model.mx.Mx" + id.camelized();
klass = Class.forName(className);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
import com.prowidesoftware.deprecation.DeprecationUtils;
import com.prowidesoftware.deprecation.ProwideDeprecated;
import com.prowidesoftware.deprecation.TargetYear;
import java.time.OffsetDateTime;
import java.util.Objects;
import javax.xml.datatype.XMLGregorianCalendar;
import org.w3c.dom.Element;

/**
Expand Down Expand Up @@ -96,7 +96,7 @@ public interface AppHdr {
*
* @return found date or null if the element is not found
*/
XMLGregorianCalendar creationDate();
OffsetDateTime creationDate();

/**
* Sets the creation date in the header object with current moment in UTC time zone.
Expand Down
Loading