Open zubri opened 6 months ago
CHANGELOG.md
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) --- 14-14: Expected: 0; Actual: 2 Unordered list indentation (MD007, ul-indent) --- 15-15: 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) --- 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) --- 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) --- 13-13: Expected: 1; Actual: 0; Below Headings should be surrounded by blank lines (MD022, blanks-around-headings) --- 17-17: 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) --- 14-14: null Lists should be surrounded by blank lines (MD032, blanks-around-lists) --- 18-18: null Lists should be surrounded by blank lines (MD032, blanks-around-lists) --- 19-19: null Bare URL used (MD034, no-bare-urls)
iso20022-core/src/main/java/com/prowidesoftware/swift/model/mx/AppHdrType.java (1)
`27-28`: **Addition of `BAH_V4` is appropriate.** The addition of `BAH_V4` to the `AppHdrType` enum is a necessary update to support the new version of business application headers. This change is well-aligned with the library's evolution to accommodate newer standards.iso20022-core/src/main/java/com/prowidesoftware/swift/model/mx/AppHdrParser.java (3)
`86-90`: **Support for BAH version 1 parsing is well-implemented.** The addition of parsing logic for `BusinessAppHdrV01` is clear and integrates well with the existing structure. --- `101-105`: **Support for BAH version 4 parsing is well-implemented.** The addition of parsing logic for `BusinessAppHdrV04` enhances the method's capability to handle newer BAH versions. --- `107-109`: **Default parsing to BAH version 2 is appropriate.** Changing the default parsing behavior to `BusinessAppHdrV02` aligns with its common usage in CBPR+ and improves the method's robustness.iso20022-core/src/main/java/com/prowidesoftware/swift/model/mx/BusinessAppHdrV04.java (5)
`72-74`: **LGTM!** The `parse(String xml)` method correctly delegates to the overloaded method with default parameters. --- `84-87`: **LGTM!** The `parse(String xml, MxReadParams params)` method includes proper null checks and uses a utility for parsing. --- `125-142`: **LGTM!** The `getBIC(Party51Choice p)` method handles potential null pointers effectively while retrieving BIC codes. --- `236-264`: **LGTM!** The `xml(MxWriteParams params)` method correctly handles JAXB marshalling and logs errors appropriately. --- `274-296`: **LGTM!** The `element(JAXBContext inputContext)` method effectively creates a DOM element and handles exceptions.iso20022-core/src/main/java/com/prowidesoftware/swift/model/mx/AppHdrFactory.java (4)
`108-110`: **LGTM!** The `createBusinessAppHdrV02` method correctly handles optional business service in the `MxId`. --- `155-157`: **LGTM!** The `createBusinessAppHdrV03` method correctly handles optional business service in the `MxId`. --- `178-204`: **LGTM!** The `createBusinessAppHdrV04` method is well-implemented, handling optional parameters and business service consistently. --- `274-275`: **LGTM!** The `createAppHdr` method correctly integrates the new `BAH_V4` case.iso20022-core/src/main/java/com/prowidesoftware/swift/model/mx/DefaultMxMetadataStrategy.java (8)
`94-94`: **Improved null check for `getCamt29Amount`.** The addition of a null check for `amount.getValue()` enhances robustness by preventing potential null pointer exceptions. --- `102-102`: **Improved null check for `getCamt52Amount`.** The added null check for `amount.getValue()` ensures that only valid amounts are processed, reducing the risk of runtime exceptions. --- `110-110`: **Improved null check for `getCamt53Amount`.** The null check for `amount.getValue()` is a good addition to prevent errors when processing monetary amounts. --- `124-124`: **Improved null check for `getCamt54Amount`.** The null check for `amount.getValue()` ensures robustness by avoiding null pointer exceptions when creating `Money` objects. --- `132-132`: **Improved null check for `getCamt56Amount`.** Adding a null check for `amount.getValue()` is a good practice to ensure that only valid data is processed. --- `140-140`: **Improved null check for `getCamt57Amount`.** The null check for `amount.getValue()` enhances the method's robustness by preventing potential null pointer exceptions. --- `151-151`: **Improved null check for `getPacs004Amount`.** The null check for `amount.getValue()` is a valuable addition to ensure that only valid monetary amounts are processed. --- `184-184`: **Improved null check for `getPacsAmount`.** The null check for `amount.getValue()` in both the group header and credit transfer attempts enhances data integrity and prevents null pointer exceptions.iso20022-core/src/test/java/com/prowidesoftware/swift/model/mx/AppHdrParserTest.java (9)
`42-42`: **Added instance type assertion in `assertSampleApplicationHeader`.** The use of `assertInstanceOf` ensures that the parsed header is of the expected type, improving test robustness. --- `74-76`: **Instance type assertion for `testParseApplicationHeader_sample_payload_mq`.** The addition of `assertInstanceOf` confirms the correct subclass is instantiated, enhancing the test's reliability. --- `89-91`: **Instance type assertion for `testParseApplicationHeader_sample_bah`.** The `assertInstanceOf` assertion ensures the correct type is used, which is crucial for validating the parsing logic. --- Line range hint `112-149`: **New test method `testParseBAH1_sample`.** The method tests parsing of a specific XML structure and includes assertions for instance type and expected values, expanding test coverage. --- Line range hint `192-214`: **Renamed and modified test method `testParseBAH1_sample2`.** The method name change reflects the specific scenario tested, and the instance type assertion ensures the correct subclass is used. --- `224-278`: **New test method `testParseBAH2_sample`.** The method tests a different version of the application header, with assertions for instance type and expected values, enhancing test coverage. --- `280-312`: **New test method `testParseBAH3_sample`.** The method tests another version of the application header, ensuring the parser's functionality across different versions. --- `314-346`: **New test method `testParseBAH4_sample`.** The method adds coverage for yet another version of the application header, with appropriate assertions to verify parsing correctness. --- `395-395`: **Updated type in `testNoNamespaceDefaultToBAH`.** The change to `BusinessAppHdrV02` reflects the expected default behavior when no namespace is present, ensuring the test aligns with the intended logic.
Summary by CodeRabbit
New Features
Improvements
Dependency Updates
Bug Fixes