-
Notifications
You must be signed in to change notification settings - Fork 71
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
SRU2024 v9.5 #113
SRU2024 v9.5 #113
Conversation
… SWIFT and ISO 20022
Warning Rate limit exceeded@zubri has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 18 minutes and 52 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📝 WalkthroughWalkthroughThe updates introduce significant enhancements to the Prowide ISO 20022 library, aligning it with the SWIFT Standard 2024. Key improvements include better handling of business services, the introduction of new message categories, and support for standard envelopes. Critical fixes, particularly addressing null pointer exceptions, bolster application robustness. Additionally, the library's dependencies have been updated to ensure improved performance and security. Changes
Sequence Diagram(s)sequenceDiagram
actor User
participant AppHdrFactory
participant MxParseUtils
participant MxId
User->>AppHdrFactory: Create Header with Business Service
AppHdrFactory->>MxId: Initialize with Business Service
User->>MxParseUtils: Identify Message
MxParseUtils->>MxId: Set Business Service
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 7
Outside diff range comments (2)
build.gradle (1)
Line range hint
209-225
: Ensure correct envelope type property name in configuration.The property
envelopeTyoe
is likely a typo and should beenvelopeType
. This could lead to runtime errors if the property is accessed incorrectly.- conf.envelopeTyoe = EnvelopeType.SWIFT; + conf.envelopeType = EnvelopeType.SWIFT;iso20022-core/src/main/java/com/prowidesoftware/swift/model/mx/AbstractMX.java (1)
Line range hint
231-310
: Optimize the XML serialization logic for clarity and efficiency.The method
message(MxWriteConfiguration)
contains complex logic for XML serialization, including conditional checks for envelope types and prefixes. This could be refactored for better clarity and possibly improved efficiency by extracting some logic into smaller, more focused methods.- if (envelope.name().startsWith("BME")) { + if (isBMEEvelope(envelope)) {And add a new method:
private boolean isBMEEvelope(EnvelopeType envelope) { return envelope.name().startsWith("BME"); }
iso20022-core/src/main/java/com/prowidesoftware/swift/model/mx/AbstractMX.java
Outdated
Show resolved
Hide resolved
iso20022-core/src/main/java/com/prowidesoftware/swift/model/mx/MxWriteConfiguration.java
Outdated
Show resolved
Hide resolved
...-core/src/test/java/com/prowidesoftware/swift/model/mx/adapters/MxWriteWithAdaptersTest.java
Show resolved
Hide resolved
|
||
@Test | ||
public void testWriteWithDefaultOptions() { | ||
final MxPacs00800110 mx = new MxPacs00800110(); | ||
mx.setAppHdr(new BusinessAppHdrV02()); | ||
mx.setFIToFICstmrCdtTrf(new FIToFICustomerCreditTransferV10()); | ||
mx.getFIToFICstmrCdtTrf().setGrpHdr(new GroupHeader96()); | ||
mx.getFIToFICstmrCdtTrf().getGrpHdr().setMsgId("123"); | ||
|
||
final String xml = mx.message(); | ||
|
||
final String expected = "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n" + "<RequestPayload>\n" | ||
+ "<head:AppHdr xmlns:head=\"urn:iso:std:iso:20022:tech:xsd:head.001.001.02\"></head:AppHdr>\n" | ||
+ "<pacs:Document xmlns:pacs=\"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.10\">\n" | ||
+ " <pacs:FIToFICstmrCdtTrf>\n" | ||
+ " <pacs:GrpHdr>\n" | ||
+ " <pacs:MsgId>123</pacs:MsgId>\n" | ||
+ " </pacs:GrpHdr>\n" | ||
+ " </pacs:FIToFICstmrCdtTrf>\n" | ||
+ "</pacs:Document>\n" | ||
+ "</RequestPayload>"; | ||
assertEquals(expected, xml); | ||
} | ||
|
||
@Test | ||
public void testWriteWithCustomOptions() { | ||
final MxPacs00800110 mx = new MxPacs00800110(); | ||
mx.setAppHdr(new BusinessAppHdrV02()); | ||
mx.setFIToFICstmrCdtTrf(new FIToFICustomerCreditTransferV10()); | ||
mx.getFIToFICstmrCdtTrf().setGrpHdr(new GroupHeader96()); | ||
mx.getFIToFICstmrCdtTrf().getGrpHdr().setMsgId("123"); | ||
|
||
MxWriteConfiguration conf = new MxWriteConfiguration(); | ||
conf.includeXMLDeclaration = false; | ||
conf.rootElement = "Message"; | ||
conf.headerPrefix = "Head"; | ||
conf.documentPrefix = "Doc"; | ||
conf.useCategoryAsDocumentPrefix = false; | ||
|
||
final String xml = mx.message(conf); | ||
|
||
final String expected = "<Message>\n" | ||
+ "<Head:AppHdr xmlns:Head=\"urn:iso:std:iso:20022:tech:xsd:head.001.001.02\"></Head:AppHdr>\n" | ||
+ "<Doc:Document xmlns:Doc=\"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.10\">\n" | ||
+ " <Doc:FIToFICstmrCdtTrf>\n" | ||
+ " <Doc:GrpHdr>\n" | ||
+ " <Doc:MsgId>123</Doc:MsgId>\n" | ||
+ " </Doc:GrpHdr>\n" | ||
+ " </Doc:FIToFICstmrCdtTrf>\n" | ||
+ "</Doc:Document>\n" | ||
+ "</Message>"; | ||
assertEquals(expected, xml); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider using more robust XML testing methods.
The current tests check for substrings in the XML output, which can be error-prone and may not catch structural issues. Consider using an XML comparison tool or library to ensure the XML structure is correct, not just the presence of certain strings.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 4
Outside diff range comments (2)
CHANGELOG.md (1)
Line range hint
134-134
: Fix the hyphenation issue.Use a hyphen in "interface-based".
- * Added a new extensible interface based model for the application headers: AppHdr + * Added a new extensible interface-based model for the application headers: AppHdrTools
Markdownlint
3-3: Expected: h2; Actual: h4
Heading levels should only increment by one level at a time(MD001, heading-increment)
4-4: Expected: 0; Actual: 2
Unordered list indentation(MD007, ul-indent)
7-7: Expected: 0; Actual: 2
Unordered list indentation(MD007, ul-indent)
8-8: Expected: 0; Actual: 2
Unordered list indentation(MD007, ul-indent)
11-11: Expected: 0; Actual: 2
Unordered list indentation(MD007, ul-indent)
12-12: Expected: 0; Actual: 2
Unordered list indentation(MD007, ul-indent)
13-13: Expected: 0; Actual: 2
Unordered list indentation(MD007, ul-indent)
14-14: Expected: 0; Actual: 2
Unordered list indentation(MD007, ul-indent)
15-15: Expected: 0; Actual: 2
Unordered list indentation(MD007, ul-indent)
16-16: Expected: 0; Actual: 2
Unordered list indentation(MD007, ul-indent)
17-17: Expected: 0; Actual: 2
Unordered list indentation(MD007, ul-indent)
18-18: Expected: 0; Actual: 2
Unordered list indentation(MD007, ul-indent)
21-21: Expected: 0; Actual: 2
Unordered list indentation(MD007, ul-indent)
22-22: Expected: 0 or 2; Actual: 1
Trailing spaces(MD009, no-trailing-spaces)
3-3: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines(MD022, blanks-around-headings)
6-6: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines(MD022, blanks-around-headings)
10-10: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines(MD022, blanks-around-headings)
20-20: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines(MD022, blanks-around-headings)
4-4: null
Lists should be surrounded by blank lines(MD032, blanks-around-lists)
7-7: null
Lists should be surrounded by blank lines(MD032, blanks-around-lists)
11-11: null
Lists should be surrounded by blank lines(MD032, blanks-around-lists)
21-21: null
Lists should be surrounded by blank lines(MD032, blanks-around-lists)
12-12: null
Bare URL used(MD034, no-bare-urls)
build.gradle (1)
Line range hint
99-100
: Standardize Dependency VersionsMultiple versions of the same dependency are declared. To avoid potential conflicts and ensure consistency, standardize the versions of the following dependencies:
org.apache.commons:commons-lang3
- Versions found:
3.12.0
,3.14.0
com.google.code.gson:gson
- Versions found:
2.9.0
,2.11.0
- implementation 'org.apache.commons:commons-lang3:3.12.0' - implementation 'com.google.code.gson:gson:2.9.0' + implementation 'org.apache.commons:commons-lang3:3.14.0' + implementation 'com.google.code.gson:gson:2.11.0'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 3
#### 9.5.0 - May 2024 | ||
* SWIFT Standard release update 2024 (live 16 November 2024) | ||
* Yearly revision of deprecation phase (see https://dev.prowidesoftware.com/SRU2024/getting-started/deprecation/) | ||
* Added message categories for File Management (cafm), Fraud Reporting and Disposition (cafm), Network Management (canm), and Settlement Reporting (casr) | ||
* Add support in the MxWriteConfiguration to use standard envelopes for SWIFT and ISO 20022 | ||
* Changed the default Document prefix to the message category; "camt", "pacs", etc... | ||
* Enhanced MxId with optional and transient businessService field to act as a message type discriminator | ||
* Dependency update: commons-lang3 -> 3.14.0 | ||
* Dependency update: gson -> 2.11.0 | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix the bare URL and grammatical errors.
Replace the bare URL with a proper markdown link and fix the colon usage before the list.
- * Yearly revision of deprecation phase (see https://dev.prowidesoftware.com/SRU2024/getting-started/deprecation/)
+ * Yearly revision of deprecation phase ([see here](https://dev.prowidesoftware.com/SRU2024/getting-started/deprecation/))
- * Added message categories for File Management (cafm), Fraud Reporting and Disposition (cafm), Network Management (canm) and Settlement Reporting (casr)
+ * Added message categories for File Management (cafm), Fraud Reporting and Disposition (cafm), Network Management (canm), and Settlement Reporting (casr)
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.
#### 9.5.0 - May 2024 | |
* SWIFT Standard release update 2024 (live 16 November 2024) | |
* Yearly revision of deprecation phase (see https://dev.prowidesoftware.com/SRU2024/getting-started/deprecation/) | |
* Added message categories for File Management (cafm), Fraud Reporting and Disposition (cafm), Network Management (canm), and Settlement Reporting (casr) | |
* Add support in the MxWriteConfiguration to use standard envelopes for SWIFT and ISO 20022 | |
* Changed the default Document prefix to the message category; "camt", "pacs", etc... | |
* Enhanced MxId with optional and transient businessService field to act as a message type discriminator | |
* Dependency update: commons-lang3 -> 3.14.0 | |
* Dependency update: gson -> 2.11.0 | |
#### 9.5.0 - May 2024 | |
* SWIFT Standard release update 2024 (live 16 November 2024) | |
* Yearly revision of deprecation phase ([see here](https://dev.prowidesoftware.com/SRU2024/getting-started/deprecation/)) | |
* Added message categories for File Management (cafm), Fraud Reporting and Disposition (cafm), Network Management (canm), and Settlement Reporting (casr) | |
* Add support in the MxWriteConfiguration to use standard envelopes for SWIFT and ISO 20022 | |
* Changed the default Document prefix to the message category; "camt", "pacs", etc... | |
* Enhanced MxId with optional and transient businessService field to act as a message type discriminator | |
* Dependency update: commons-lang3 -> 3.14.0 | |
* Dependency update: gson -> 2.11.0 |
Tools
Markdownlint
11-11: Expected: 0; Actual: 2
Unordered list indentation(MD007, ul-indent)
12-12: Expected: 0; Actual: 2
Unordered list indentation(MD007, ul-indent)
13-13: Expected: 0; Actual: 2
Unordered list indentation(MD007, ul-indent)
14-14: Expected: 0; Actual: 2
Unordered list indentation(MD007, ul-indent)
15-15: Expected: 0; Actual: 2
Unordered list indentation(MD007, ul-indent)
16-16: Expected: 0; Actual: 2
Unordered list indentation(MD007, ul-indent)
17-17: Expected: 0; Actual: 2
Unordered list indentation(MD007, ul-indent)
18-18: Expected: 0; Actual: 2
Unordered list indentation(MD007, ul-indent)
10-10: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines(MD022, blanks-around-headings)
11-11: null
Lists should be surrounded by blank lines(MD032, blanks-around-lists)
12-12: null
Bare URL used(MD034, no-bare-urls)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 8
#### 9.5.0 - May 2024 | ||
* SWIFT Standard release update 2024 (live 16 November 2024) | ||
* Yearly revision of deprecation phase (see https://dev.prowidesoftware.com/SRU2024/getting-started/deprecation/) | ||
* Added message categories for File Management (cafm), Fraud Reporting and Disposition (cafm), Network Management (canm), and Settlement Reporting (casr) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix the colon usage.
Do not use a colon before a series introduced by a preposition.
- * Added message categories for File Management (cafm), Fraud Reporting and Disposition (cafm), Network Management (canm), and Settlement Reporting (casr)
+ * Added message categories for File Management (cafm), Fraud Reporting and Disposition (cafm), Network Management (canm), and Settlement Reporting (casr)
Committable suggestion was skipped due to low confidence.
Tools
Markdownlint
16-16: Expected: 0; Actual: 2
Unordered list indentation(MD007, ul-indent)
|
||
#### 9.5.0 - May 2024 | ||
* SWIFT Standard release update 2024 (live 16 November 2024) | ||
* Yearly revision of deprecation phase (see https://dev.prowidesoftware.com/SRU2024/getting-started/deprecation/) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix the bare URL usage.
Replace the bare URL with a proper markdown link.
- * Yearly revision of deprecation phase (see https://dev.prowidesoftware.com/SRU2024/getting-started/deprecation/)
+ * Yearly revision of deprecation phase ([see here](https://dev.prowidesoftware.com/SRU2024/getting-started/deprecation/))
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.
* Yearly revision of deprecation phase (see https://dev.prowidesoftware.com/SRU2024/getting-started/deprecation/) | |
* Yearly revision of deprecation phase ([see here](https://dev.prowidesoftware.com/SRU2024/getting-started/deprecation/)) |
Tools
Markdownlint
15-15: Expected: 0; Actual: 2
Unordered list indentation(MD007, ul-indent)
15-15: null
Bare URL used(MD034, no-bare-urls)
CHANGELOG.md
Outdated
@@ -1,8 +1,25 @@ | |||
# Prowide ISO 20022 - CHANGELOG | |||
|
|||
#### 9.4.6 - May 2024 | |||
#### 9.5.3 - SNAPSHOT |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix the heading level issue.
Ensure that the heading levels only increment by one level at a time.
-#### 9.5.3 - SNAPSHOT
+## 9.5.3 - SNAPSHOT
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.
#### 9.5.3 - SNAPSHOT | |
## 9.5.3 - SNAPSHOT |
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)
@@ -1,8 +1,25 @@ | |||
# Prowide ISO 20022 - CHANGELOG | |||
|
|||
#### 9.4.6 - May 2024 | |||
#### 9.5.3 - SNAPSHOT | |||
* (PW-1947) Updated MX model with latest SWIFT SRU2024 schema update, including new messages such as trck.001.001.03 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix the unordered list indentation.
Ensure the unordered list items are correctly indented.
- * (PW-1947) Updated MX model with latest SWIFT SRU2024 schema update, including new messages such as trck.001.001.03
+* (PW-1947) Updated MX model with latest SWIFT SRU2024 schema update, including new messages such as trck.001.001.03
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.
* (PW-1947) Updated MX model with latest SWIFT SRU2024 schema update, including new messages such as trck.001.001.03 | |
* (PW-1947) Updated MX model with latest SWIFT SRU2024 schema update, including new messages such as trck.001.001.03 |
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)
* Add support in the MxWriteConfiguration to use standard envelopes for SWIFT and ISO 20022 | ||
* Changed the default Document prefix to the message category; "camt", "pacs", etc... | ||
* Enhanced MxId with optional and transient businessService field to act as a message type discriminator | ||
* Dependency update: commons-lang3 -> 3.14.0 | ||
* Dependency update: gson -> 2.11.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix the indentation issue.
Ensure the unordered list items are correctly indented.
- * Add support in the MxWriteConfiguration to use standard envelopes for SWIFT and ISO 20022
- * Changed the default Document prefix to the message category; "camt", "pacs", etc...
- * Enhanced MxId with optional and transient businessService field to act as a message type discriminator
- * Dependency update: commons-lang3 -> 3.14.0
- * Dependency update: gson -> 2.11.0
+* Add support in the MxWriteConfiguration to use standard envelopes for SWIFT and ISO 20022
+* Changed the default Document prefix to the message category; "camt", "pacs", etc...
+* Enhanced MxId with optional and transient businessService field to act as a message type discriminator
+* Dependency update: commons-lang3 -> 3.14.0
+* Dependency update: gson -> 2.11.0
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.
* Add support in the MxWriteConfiguration to use standard envelopes for SWIFT and ISO 20022 | |
* Changed the default Document prefix to the message category; "camt", "pacs", etc... | |
* Enhanced MxId with optional and transient businessService field to act as a message type discriminator | |
* Dependency update: commons-lang3 -> 3.14.0 | |
* Dependency update: gson -> 2.11.0 | |
* Add support in the MxWriteConfiguration to use standard envelopes for SWIFT and ISO 20022 | |
* Changed the default Document prefix to the message category; "camt", "pacs", etc... | |
* Enhanced MxId with optional and transient businessService field to act as a message type discriminator | |
* Dependency update: commons-lang3 -> 3.14.0 | |
* Dependency update: gson -> 2.11.0 |
Tools
Markdownlint
17-17: Expected: 0; Actual: 2
Unordered list indentation(MD007, ul-indent)
18-18: Expected: 0; Actual: 2
Unordered list indentation(MD007, ul-indent)
19-19: Expected: 0; Actual: 2
Unordered list indentation(MD007, ul-indent)
20-20: Expected: 0; Actual: 2
Unordered list indentation(MD007, ul-indent)
21-21: Expected: 0; Actual: 2
Unordered list indentation(MD007, ul-indent)
private static final Logger log = Logger.getLogger(AbstractMX.class.getName()); | ||
/** | ||
* Default root element when an MX is serialized as XML including both AppHdr and Document | ||
* | ||
* @since 8.0.2 | ||
* @deprecated the default root element for the custom envelope is now defined in {@link EnvelopeType#CUSTOM} | ||
*/ | ||
@Deprecated | ||
@ProwideDeprecated(phase2 = TargetYear.SRU2025) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider revising the deprecation phase for DEFAULT_ROOT_ELEMENT
.
The DEFAULT_ROOT_ELEMENT
is now deprecated with a phase2 target of SRU2025. Given that this is a widely used constant, consider extending the deprecation phase to allow more time for migration.
/** | ||
* Parses the XML string containing the Document and optional AppHdr into a specific instance of MX message object. | ||
* The message and header types and version is auto detected. | ||
* The message and header types and version is auto-detected. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review deprecation strategy and ensure consistency.
Several methods such as parse(File, MxId)
, write(File)
, and write(OutputStream)
are marked for deprecation by SRU2025 with a recommendation to use alternatives. Ensure that all recommended alternatives are documented clearly and consider providing examples in the deprecation annotations to aid the transition.
@ProwideDeprecated(phase4 = TargetYear.SRU2025) | ||
public static AbstractMX parse(final File file, MxId id) throws IOException { | ||
DeprecationUtils.phase2( | ||
DeprecationUtils.phase3( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ensure clear recommendation in deprecation annotation.
The method parse(File, MxId)
is marked for deprecation. Ensure that the deprecation annotation includes a clear recommendation for the alternative method to use.
- @ProwideDeprecated(phase4 = TargetYear.SRU2025)
+ @ProwideDeprecated(phase4 = TargetYear.SRU2025, alternative = "Lib.readFile(file) and any parse from String method")
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.
@ProwideDeprecated(phase4 = TargetYear.SRU2025) | |
public static AbstractMX parse(final File file, MxId id) throws IOException { | |
DeprecationUtils.phase2( | |
DeprecationUtils.phase3( | |
@ProwideDeprecated(phase4 = TargetYear.SRU2025, alternative = "Lib.readFile(file) and any parse from String method") | |
public static AbstractMX parse(final File file, MxId id) throws IOException { | |
DeprecationUtils.phase3( |
83a2a64
to
0108398
Compare
…essageapplyStrategy
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 7
+ "<RequestPayload>" | ||
+ "<h:AppHdr xmlns:h=\"urn:swift:xsd:$ahV10\">" | ||
+ " <h:From>" | ||
+ " <h:Type>BIC</h:Type>" | ||
+ " <h:Id>AAAANGL0XXX</h:Id>" | ||
+ " </h:From>" | ||
+ " <h:To>" | ||
+ " <h:Type>BIC</h:Type>" | ||
+ " <h:Id>BBBBUS33XXX</h:Id>" | ||
+ " </h:To>" | ||
+ " <h:MsgName>pacs.008.001.08</h:MsgName>" | ||
+ " <h:MsgRef>FOOBAR1</h:MsgRef>" | ||
+ " <h:CrDate>2022-05-05T06:07:14Z</h:CrDate>" | ||
+ "</h:AppHdr>" | ||
+ "<Doc:Document xmlns:Doc=\"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08\">" | ||
+ " <Doc:FIToFICstmrCdtTrf>" | ||
+ " <Doc:GrpHdr>" | ||
+ " <Doc:MsgId>FOOBAR2</Doc:MsgId>" | ||
+ " <Doc:CreDtTm>2022-05-05T06:07:14Z</Doc:CreDtTm>" | ||
+ " <Doc:NbOfTxs>1</Doc:NbOfTxs>" | ||
+ " <Doc:SttlmInf>" | ||
+ " <Doc:SttlmMtd>INDA</Doc:SttlmMtd>" | ||
+ " <Doc:SttlmAcct>" | ||
+ " <Doc:Id>" | ||
+ " <Doc:Othr>" | ||
+ " <Doc:Id>04435001</Doc:Id>" | ||
+ " </Doc:Othr>" | ||
+ " </Doc:Id>" | ||
+ " </Doc:SttlmAcct>" | ||
+ " </Doc:SttlmInf>" | ||
+ " <Doc:InstgAgt>" | ||
+ " <Doc:FinInstnId>" | ||
+ " <Doc:BICFI>AAAANGL0XXX</Doc:BICFI>" | ||
+ " </Doc:FinInstnId>" | ||
+ " </Doc:InstgAgt>" | ||
+ " <Doc:InstdAgt>" | ||
+ " <Doc:FinInstnId>" | ||
+ " <Doc:BICFI>BBBBUS33XXX</Doc:BICFI>" | ||
+ " </Doc:FinInstnId>" | ||
+ " </Doc:InstdAgt>" | ||
+ " </Doc:GrpHdr>" | ||
+ " <Doc:CdtTrfTxInf>" | ||
+ " <Doc:PmtId>" | ||
+ " <Doc:InstrId>REF333222333</Doc:InstrId>" | ||
+ " <Doc:EndToEndId>RRRR345345</Doc:EndToEndId>" | ||
+ " <Doc:TxId>FFDD34534</Doc:TxId>" | ||
+ " </Doc:PmtId>" | ||
+ " <Doc:IntrBkSttlmAmt Ccy=\"USD\"></Doc:IntrBkSttlmAmt>" | ||
+ " <Doc:IntrBkSttlmDt>2022-05-05</Doc:IntrBkSttlmDt>" | ||
+ " <Doc:InstdAmt Ccy=\"USD\"></Doc:InstdAmt>" | ||
+ " <Doc:ChrgBr>DEBT</Doc:ChrgBr>" | ||
+ " <Doc:Dbtr>" | ||
+ " <Doc:Nm>FOO FEED MILLS COLTD</Doc:Nm>" | ||
+ " <Doc:PstlAdr>" | ||
+ " <Doc:AdrLine>1 GOLDEN PENNY PLACE, WHARF ROAD,</Doc:AdrLine>" | ||
+ " <Doc:AdrLine>APAPA LAGOS</Doc:AdrLine>" | ||
+ " </Doc:PstlAdr>" | ||
+ " </Doc:Dbtr>" | ||
+ " <Doc:DbtrAcct>" | ||
+ " <Doc:Id>" | ||
+ " <Doc:Othr>" | ||
+ " <Doc:Id>2028766092</Doc:Id>" | ||
+ " </Doc:Othr>" | ||
+ " </Doc:Id>" | ||
+ " </Doc:DbtrAcct>" | ||
+ " <Doc:DbtrAgt>" | ||
+ " <Doc:FinInstnId>" | ||
+ " <Doc:BICFI>AAAANGLA</Doc:BICFI>" | ||
+ " </Doc:FinInstnId>" | ||
+ " </Doc:DbtrAgt>" | ||
+ " <Doc:CdtrAgt>" | ||
+ " <Doc:FinInstnId>" | ||
+ " <Doc:BICFI>BBBBRU21</Doc:BICFI>" | ||
+ " </Doc:FinInstnId>" | ||
+ " </Doc:CdtrAgt>" | ||
+ " <Doc:Cdtr>" | ||
+ " <Doc:Nm>TEST</Doc:Nm>" | ||
+ " <Doc:PstlAdr>" | ||
+ " <Doc:AdrLine>TEST</Doc:AdrLine>" | ||
+ " </Doc:PstlAdr>" | ||
+ " </Doc:Cdtr>" | ||
+ " <Doc:CdtrAcct>" | ||
+ " <Doc:Id>" | ||
+ " <Doc:Othr>" | ||
+ " <Doc:Id>TEST</Doc:Id>" | ||
+ " </Doc:Othr>" | ||
+ " </Doc:Id>" | ||
+ " </Doc:CdtrAcct>" | ||
+ " <Doc:RmtInf>" | ||
+ " <Doc:Ustrd>AGRICULTURAL SECTOR</Doc:Ustrd>" | ||
+ " </Doc:RmtInf>" | ||
+ " </Doc:CdtTrfTxInf>" | ||
+ " </Doc:FIToFICstmrCdtTrf>" | ||
+ "</Doc:Document>" | ||
+ "</RequestPayload>"; | ||
new MxSwiftMessage(xml); | ||
} catch (Exception e) { | ||
fail(); | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Enhance test with assertions.
The test method currently checks for exceptions but lacks assertions to verify the expected behavior of MxSwiftMessage
. Consider adding assertions to validate the parsing results.
// Example assertion to consider adding
// assertNotNull(parsedMessage);
// assertEquals(expectedValue, parsedMessage.getSomeProperty());
@@ -1,8 +1,29 @@ | |||
# Prowide ISO 20022 - CHANGELOG | |||
|
|||
#### 9.4.6 - May 2024 | |||
#### 9.5.4 - August 2024 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a blank line after the heading.
Ensure that headings are surrounded by blank lines for better readability.
#### 9.5.4 - August 2024
* (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.
#### 9.5.4 - August 2024 | |
#### 9.5.4 - August 2024 | |
* (PW-1958) Fixed the `DefaultMxMetadataStrategy` NPE issue when the amount values are null |
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-1947) Updated MX model with latest SWIFT SRU2024 schema update, including new messages such as trck.001.001.03 | ||
* Add support for Business Application Header version head.001.001.04 | ||
|
||
#### 9.5.2 - June 2024 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a blank line after the heading.
Ensure that headings are surrounded by blank lines for better readability.
#### 9.5.2 - June 2024
* (PW-1875) Fixed the `ZuluDateTimeAdapter` to convert the datetime to UTC offset if needed
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.
#### 9.5.2 - June 2024 | |
#### 9.5.2 - June 2024 | |
* (PW-1875) Fixed the `ZuluDateTimeAdapter` to convert the datetime to UTC offset if needed |
Tools
Markdownlint
10-10: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines(MD022, blanks-around-headings)
* (PW-1875) Fixed the `ZuluDateTimeAdapter` to convert the datetime to UTC offset if needed | ||
|
||
|
||
#### 9.5.1 - June 2024 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a blank line after the heading.
Ensure that headings are surrounded by blank lines for better readability.
#### 9.5.1 - June 2024
* Enhanced the AppHdrFactory to honor the business service set in the parameter MxId
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.
#### 9.5.1 - June 2024 | |
#### 9.5.1 - June 2024 | |
* Enhanced the AppHdrFactory to honor the business service set in the parameter MxId |
Tools
Markdownlint
13-13: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines(MD022, blanks-around-headings)
#### 9.5.4 - August 2024 | ||
* (PW-1958) Fixed the `DefaultMxMetadataStrategy` NPE issue when the amount values are null | ||
|
||
#### 9.5.3 - August 2024 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a blank line after the heading.
Ensure that headings are surrounded by blank lines for better readability.
#### 9.5.3 - August 2024
* (PW-1947) Updated MX model with latest SWIFT SRU2024 schema update, including new messages such as trck.001.001.03
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.
#### 9.5.3 - August 2024 | |
#### 9.5.3 - August 2024 | |
* (PW-1947) Updated MX model with latest SWIFT SRU2024 schema update, including new messages such as trck.001.001.03 |
Tools
Markdownlint
6-6: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines(MD022, blanks-around-headings)
* SWIFT Standard release update 2024 (live 16 November 2024) | ||
* Yearly revision of deprecation phase (see https://dev.prowidesoftware.com/SRU2024/getting-started/deprecation/) | ||
* Added message categories for File Management (cafm), Fraud Reporting and Disposition (cafm), Network Management (canm), and Settlement Reporting (casr) | ||
* Add support in the MxWriteConfiguration to use standard envelopes for SWIFT and ISO 20022 | ||
* Changed the default Document prefix to the message category; "camt", "pacs", etc... | ||
* Enhanced MxId with optional and transient businessService field to act as a message type discriminator | ||
* Dependency update: commons-lang3 -> 3.14.0 | ||
* Dependency update: gson -> 2.11.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix the unordered list indentation.
Ensure the unordered list items are correctly indented.
* SWIFT Standard release update 2024 (live 16 November 2024)
* Yearly revision of deprecation phase ([see here](https://dev.prowidesoftware.com/SRU2024/getting-started/deprecation/))
* Added message categories for File Management (cafm), Fraud Reporting and Disposition (cafm), Network Management (canm), and Settlement Reporting (casr)
* Add support in the MxWriteConfiguration to use standard envelopes for SWIFT and ISO 20022
* Changed the default Document prefix to the message category; "camt", "pacs", etc...
* Enhanced MxId with optional and transient businessService field to act as a message type discriminator
* Dependency update: commons-lang3 -> 3.14.0
* Dependency update: gson -> 2.11.0
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.
* SWIFT Standard release update 2024 (live 16 November 2024) | |
* Yearly revision of deprecation phase (see https://dev.prowidesoftware.com/SRU2024/getting-started/deprecation/) | |
* Added message categories for File Management (cafm), Fraud Reporting and Disposition (cafm), Network Management (canm), and Settlement Reporting (casr) | |
* Add support in the MxWriteConfiguration to use standard envelopes for SWIFT and ISO 20022 | |
* Changed the default Document prefix to the message category; "camt", "pacs", etc... | |
* Enhanced MxId with optional and transient businessService field to act as a message type discriminator | |
* Dependency update: commons-lang3 -> 3.14.0 | |
* Dependency update: gson -> 2.11.0 | |
* SWIFT Standard release update 2024 (live 16 November 2024) | |
* Yearly revision of deprecation phase ([see here](https://dev.prowidesoftware.com/SRU2024/getting-started/deprecation/)) | |
* Added message categories for File Management (cafm), Fraud Reporting and Disposition (cafm), Network Management (canm), and Settlement Reporting (casr) | |
* Add support in the MxWriteConfiguration to use standard envelopes for SWIFT and ISO 20022 | |
* Changed the default Document prefix to the message category; "camt", "pacs", etc... | |
* Enhanced MxId with optional and transient businessService field to act as a message type discriminator | |
* Dependency update: commons-lang3 -> 3.14.0 | |
* Dependency update: gson -> 2.11.0 |
Tools
Markdownlint
18-18: Expected: 0; Actual: 2
Unordered list indentation(MD007, ul-indent)
19-19: Expected: 0; Actual: 2
Unordered list indentation(MD007, ul-indent)
20-20: Expected: 0; Actual: 2
Unordered list indentation(MD007, ul-indent)
21-21: Expected: 0; Actual: 2
Unordered list indentation(MD007, ul-indent)
22-22: Expected: 0; Actual: 2
Unordered list indentation(MD007, ul-indent)
23-23: Expected: 0; Actual: 2
Unordered list indentation(MD007, ul-indent)
24-24: Expected: 0; Actual: 2
Unordered list indentation(MD007, ul-indent)
25-25: Expected: 0; Actual: 2
Unordered list indentation(MD007, ul-indent)
18-18: null
Lists should be surrounded by blank lines(MD032, blanks-around-lists)
19-19: null
Bare URL used(MD034, no-bare-urls)
#### 9.5.0 - May 2024 | ||
* SWIFT Standard release update 2024 (live 16 November 2024) | ||
* Yearly revision of deprecation phase (see https://dev.prowidesoftware.com/SRU2024/getting-started/deprecation/) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix the heading and URL formatting.
Add a blank line after the heading and replace the bare URL with a markdown link.
#### 9.5.0 - May 2024
* SWIFT Standard release update 2024 (live 16 November 2024)
* Yearly revision of deprecation phase ([see here](https://dev.prowidesoftware.com/SRU2024/getting-started/deprecation/))
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.
#### 9.5.0 - May 2024 | |
* SWIFT Standard release update 2024 (live 16 November 2024) | |
* Yearly revision of deprecation phase (see https://dev.prowidesoftware.com/SRU2024/getting-started/deprecation/) | |
#### 9.5.0 - May 2024 | |
* SWIFT Standard release update 2024 (live 16 November 2024) | |
* Yearly revision of deprecation phase ([see here](https://dev.prowidesoftware.com/SRU2024/getting-started/deprecation/)) |
Tools
Markdownlint
18-18: Expected: 0; Actual: 2
Unordered list indentation(MD007, ul-indent)
19-19: Expected: 0; Actual: 2
Unordered list indentation(MD007, ul-indent)
17-17: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines(MD022, blanks-around-headings)
18-18: null
Lists should be surrounded by blank lines(MD032, blanks-around-lists)
19-19: null
Bare URL used(MD034, no-bare-urls)
Summary by CodeRabbit
New Features
Improvements
Dependency Updates
Bug Fixes