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 #162

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
9e6b724
GH-56: JAXB Upgrade Plan, Migration to Jakarta EE 10, Migration to Ja…
zubri May 8, 2023
9339793
upgrade to Java 11
zubri May 8, 2023
a56d25c
changelog
zubri May 9, 2023
30574d4
Merge remote-tracking branch 'origin/SRU2023' into SRU2023_v10
zubri Jun 5, 2023
53a5cd2
comment and Idea compiler param update
zubri Jun 6, 2023
2353ab0
Merge branch 'SRU2023' into SRU2023_v10
zubri Jun 14, 2023
6c38831
Merge branch 'SRU2023' into SRU2023_v10
zubri Jun 14, 2023
6ef66b0
release
zubri Jun 14, 2023
55fc7dc
Merge branch 'SRU2023' into SRU2023_v10
zubri Jun 27, 2023
c2043d9
release
zubri Jul 1, 2023
7901a64
spotless code formatting
zubri Aug 4, 2023
db6965f
Merge remote-tracking branch 'origin/SRU2023' into SRU2023_v10
zubri Aug 4, 2023
d848bbd
Merge branch 'SRU2023' into SRU2023_v10
zubri Aug 4, 2023
e222be1
release
zubri Aug 4, 2023
06e69d0
Merge branch 'SRU2023' into SRU2023_v10
zubri Aug 23, 2023
eadb987
Merge branch 'SRU2023' into SRU2023_v10
zubri Aug 23, 2023
ce7b218
release
zubri Aug 23, 2023
f27bff1
Merge branch 'SRU2023' into SRU2023_v10
ptorres-prowide Sep 2, 2023
3e495b7
Merge branch 'SRU2023' into SRU2023_v10
zubri Sep 20, 2023
ca77829
release
zubri Sep 21, 2023
c2dd8b7
Merge branch 'SRU2023' into SRU2023_v10
zubri Sep 22, 2023
f989a6a
Merge branch 'SRU2023' into SRU2023_v10
zubri Oct 14, 2023
1bafbf4
Remove deprecation annotation for fields relocated to the Prowide Int…
zubri Oct 26, 2023
ec42431
Merge branch 'SRU2023' into SRU2023_v10
zubri Oct 30, 2023
bff2ec5
Merge branch 'SRU2023' into SRU2023_v10
zubri Nov 7, 2023
5fb0003
Merge branch 'SRU2023' into SRU2023_v10
zubri Nov 10, 2023
d3c2aa6
Merge branch 'SRU2023' into SRU2023_v10
zubri Nov 11, 2023
e96050d
Merge branch 'SRU2023' into SRU2023_v10
zubri Nov 17, 2023
f38d191
Merge branch 'develop' into SRU2023_v10
zubri Nov 21, 2023
0ca2502
Merge branch 'develop' into SRU2023_v10
zubri Nov 30, 2023
b7cba31
Update gradle to 8.5 and update all plugins rto latest versions
zubri Dec 14, 2023
7711f1d
Merge branch 'develop' into SRU2023_v10
zubri Dec 22, 2023
4360f17
Merge branch 'develop' into SRU2023_v10
zubri Dec 22, 2023
ff4d58c
Merge branch 'develop' into SRU2023_v10
zubri Mar 7, 2024
6432a35
Merge branch 'develop' into SRU2023_v10
zubri Mar 25, 2024
ce46ca4
Merge branch 'develop' into SRU2023_v10
zubri Mar 27, 2024
88c1389
Merge branch 'develop' into SRU2023_v10
zubri May 9, 2024
450ce7f
Merge branch 'develop' into SRU2023_v10
zubri May 23, 2024
4aa5bda
Update CHANGELOG.md
zubri May 23, 2024
a8a504b
Merge branch 'develop' into SRU2023_v10
zubri Jun 28, 2024
e85e9c7
update publishing plugin
zubri Jun 28, 2024
c083729
Merge branch 'main' into SRU2023_v10
zubri Aug 22, 2024
7a7f50e
Merge branch 'main' into SRU2023_v10
zubri Sep 18, 2024
8316563
Merge branch 'main' into SRU2023_v10
zubri Sep 30, 2024
0d26e06
Merge branch 'main' into SRU2023_v10
zubri Sep 30, 2024
db7d108
compile fix (javax -> jakarta)
zubri Sep 30, 2024
9bd19c9
release
zubri Oct 10, 2024
d3f8865
Merge branch 'main' into SRU2023_v10
zubri Oct 10, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 15 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,18 @@ out
.checkstyle
pom.xml
release.sh
.idea/*
*.pb
.idea/gradle.xml
.idea/jarRepositories.xml
.idea/misc.xml
.idea/modules.xml
.idea/prowide-core.iml
.idea/uiDesigner.xml
.idea/vcs.xml
.idea/workspace.xml
.idea/libraries-with-intellij-classes.xml
.idea/jpa-buddy.xml
.idea/runConfigurations.xml
.idea/.name
*.pb
.java-version
.idea/sonarlint/
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.

41 changes: 22 additions & 19 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,69 +1,72 @@
# Prowide Core - CHANGELOG

#### 9.4.18 - October 2024
#### 10.1.17 - October 2024
* Added new `FieldEnum` with all the available field names
* Code security improvements as per CodeQL recommendations

#### 9.4.17 - June 2024
#### 10.1.16 - June 2024
* (PW-1913) Added IBAN validation for Egypt local account structure

#### 9.4.16 - May 2024
#### 10.1.15 - May 2024
zubri marked this conversation as resolved.
Show resolved Hide resolved
* (PW-1862) Added NarrativeFragment class for detailed line information in StructuredNarrative fragments
* Fixed SwiftMessage getPDE(): return empty value instead of null when codeword exists and has no value
* Added isPercentage() helper method to field 37K

#### 9.4.15 - March 2024
#### 10.1.14 - March 2024
zubri marked this conversation as resolved.
Show resolved Hide resolved
* (PW-1812) Updated the narrative resolver, format 2 (used in field 72 for example), to allow empty values as part of the narrative fragment
* Updated validators for BIC, country, and currency constraints to utilize keywords for i18n-compatible messages
* Deprecated unnecessary methods in the SafeXmlUtils class

#### 9.4.14 - December 2023
#### 10.1.13 - December 2023
zubri marked this conversation as resolved.
Show resolved Hide resolved
* (PW-1718) Changed the getComponentLabel(component) in Field59F to be dynamic based on the line identifiers (similar to existing API in Field50F)

#### 9.4.13 - November 2023
#### 10.1.12 - November 2023
zubri marked this conversation as resolved.
Show resolved Hide resolved
* (PW-1697) Fixed validation/parse pattern in field 29O
* (PW-1697) MT306 changes in field 30I
* Added DistinguishedName with Builder in order to encapsulate the BIC branch name logic
* Added DistinguishedName with Builder to encapsulate the BIC branch name logic

#### 9.4.12 - November 2023
#### 10.1.11 - November 2023
zubri marked this conversation as resolved.
Show resolved Hide resolved
* (PW-1697) Fixed validation pattern in fields 14[H,K,L,M,N,O] and 29J

#### 9.4.11 - November 2023
#### 10.1.10 - November 2023
zubri marked this conversation as resolved.
Show resolved Hide resolved
* (PW-1695) Fixed a stack overflow in the fields fromJson implementation when a malformed JSON input contains empty field names
* (PW-1688) Added missing field labels for SRU2023 changes in the pw_swift_*.properties file

#### 9.4.10 - October 2023
#### 10.1.9 - October 2023
* (PW-1675) update to Field 31R to support also two date components as requested by SCORE messages
* Added 36B and 36D getters to MT543

#### 9.4.9 - October 2023
#### 10.1.8 - October 2023
* (PW-1659) Field 24G deprecated Name and Address for Narrative

#### 9.4.8 - October 2023
#### 10.1.7 - October 2023
* Added default methods for sender, receiver, and identifier extraction to the MessageExtractionStrategy
* Added JSON to the `FileFormat` enumeration

#### 9.4.7 - September 2023
#### 10.1.6 - September 2023
* (PW-1478) Fixed Field 44J parse and getValue to enable proper data preservation when the field contains multiline content

#### 9.4.6 - September 2023
#### 10.1.5 - September 2023
* Added support for an optional `pw-swift-core.properties` to customize the behavior of the SafeXmlUtils class

#### 9.4.5 - August 2023
#### 10.1.4 - September 2023
* (PW-1478) Field 44J parse and getValue fix

#### 9.4.4 - August 2023
#### 10.1.3 - August 2023
* (PW-1478) Field 44J format fixed to allow multiline

#### 9.4.3 - July 2023
#### 10.1.2 - August 2023
* (PW-1461) Remove deprecation of field 31R model since is it used back in SRU2023
* (PW-1405) Trim original String payload when creating an AbstractSwiftMessage

#### 9.4.2 - June 2023
#### 10.1.1 - July 2023
* (GH-163) Remove unnecessary padding in sender and receiver in AbstractMT#creeate(number, sender, receiver) method
* (PW-1323) Fixing getValue method for pattern issue in Field44J

#### 9.4.1 - June 2023
#### 10.1.0 - June 2023
* Migration to Java 11
* Migration to Jakarta EE 10
* (PW-1323) Fixing getValue method for pattern issue in Field44J
* (PW-1323) Fixing missing pattern issue in Field44J
Comment on lines 1 to 70
Copy link

Choose a reason for hiding this comment

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

🧹 Nitpick (assertive)

Overall assessment of the changelog

The changelog for Prowide Core demonstrates active development and significant improvements to the library. Key points to note:

  1. Continuous updates and bug fixes across multiple versions show dedication to maintaining and improving the library.
  2. Important enhancements have been made to various fields and message types, improving data handling and validation.
  3. The addition of new features like the FieldEnum and NarrativeFragment class enhances the library's functionality.
  4. Security improvements based on CodeQL recommendations are a positive step towards a more secure codebase.
  5. The migration to Java 11 and Jakarta EE 10 in version 10.1.0 represents a major technological upgrade.

While these changes are generally positive, it's crucial to ensure that the major version updates (Java 11 and Jakarta EE 10) don't introduce compatibility issues for existing users. Thorough testing and possibly a migration guide for users would be beneficial.

Consider the following recommendations:

  1. Provide a detailed migration guide for users upgrading from earlier versions, especially regarding the Java 11 and Jakarta EE 10 changes.
  2. Ensure comprehensive test coverage for all new features and changes, particularly the NarrativeFragment class and updated field handlers.
  3. Consider implementing a deprecation policy with clear timelines to help users prepare for future changes.
  4. If not already in place, consider setting up automated compatibility tests to catch potential breaking changes early in the development process.
🧰 Tools
🪛 LanguageTool

[typographical] ~3-~3: If you want to indicate numerical ranges or time ranges, consider using an en dash.
Context: ...# Prowide Core - CHANGELOG #### 10.1.17 - October 2024 * Added new FieldEnum w...

(DASH_RULE)


[typographical] ~7-~7: If you want to indicate numerical ranges or time ranges, consider using an en dash.
Context: ...per CodeQL recommendations #### 10.1.16 - June 2024 * (PW-1913) Added IBAN valid...

(DASH_RULE)


[typographical] ~10-~10: If you want to indicate numerical ranges or time ranges, consider using an en dash.
Context: ...pt local account structure #### 10.1.15 - May 2024 * (PW-1862) Added NarrativeFr...

(DASH_RULE)


[typographical] ~15-~15: If you want to indicate numerical ranges or time ranges, consider using an en dash.
Context: ...helper method to field 37K #### 10.1.14 - March 2024 * (PW-1812) Updated the nar...

(DASH_RULE)


[typographical] ~20-~20: If you want to indicate numerical ranges or time ranges, consider using an en dash.
Context: ... in the SafeXmlUtils class #### 10.1.13 - December 2023 * (PW-1718) Changed the ...

(DASH_RULE)


[typographical] ~23-~23: If you want to indicate numerical ranges or time ranges, consider using an en dash.
Context: ... existing API in Field50F) #### 10.1.12 - November 2023 * (PW-1697) Fixed valida...

(DASH_RULE)


[typographical] ~28-~28: If you want to indicate numerical ranges or time ranges, consider using an en dash.
Context: ...the BIC branch name logic #### 10.1.11 - November 2023 * (PW-1697) Fixed valida...

(DASH_RULE)


[typographical] ~31-~31: If you want to indicate numerical ranges or time ranges, consider using an en dash.
Context: ...ds 14[H,K,L,M,N,O] and 29J #### 10.1.10 - November 2023 * (PW-1695) Fixed a stac...

(DASH_RULE)

🪛 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)


5-5: 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)


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)


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

(MD007, ul-indent)


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

(MD007, ul-indent)


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

(MD007, ul-indent)


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

(MD007, ul-indent)


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

(MD007, ul-indent)


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

(MD007, ul-indent)


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

(MD007, ul-indent)


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

(MD007, ul-indent)


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

(MD007, ul-indent)


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

(MD007, ul-indent)


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

(MD007, ul-indent)


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

(MD007, ul-indent)


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

(MD007, ul-indent)


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

(MD007, ul-indent)


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

(MD007, ul-indent)


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

(MD007, ul-indent)


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

(MD007, ul-indent)


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

(MD007, ul-indent)


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

(MD007, ul-indent)


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

(MD007, ul-indent)


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

(MD007, ul-indent)


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

(MD007, ul-indent)


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

(MD007, ul-indent)


26-26: 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)


7-7: 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)


15-15: 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)


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

(MD022, blanks-around-headings)


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

(MD022, blanks-around-headings)


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

(MD022, blanks-around-headings)


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

(MD022, blanks-around-headings)


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

(MD022, blanks-around-headings)


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

(MD022, blanks-around-headings)


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

(MD022, blanks-around-headings)


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

(MD022, blanks-around-headings)


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

(MD022, blanks-around-headings)


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

(MD022, blanks-around-headings)


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

(MD022, blanks-around-headings)


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

(MD022, blanks-around-headings)


66-66: 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)


8-8: 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)


16-16: 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)


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

(MD032, blanks-around-lists)


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

(MD032, blanks-around-lists)


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

(MD032, blanks-around-lists)


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

(MD032, blanks-around-lists)


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

(MD032, blanks-around-lists)


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

(MD032, blanks-around-lists)


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

(MD032, blanks-around-lists)


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

(MD032, blanks-around-lists)


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

(MD032, blanks-around-lists)


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

(MD032, blanks-around-lists)


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

(MD032, blanks-around-lists)


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

(MD032, blanks-around-lists)


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

(MD032, blanks-around-lists)


#### 9.4.0 - May 2023
Expand Down
44 changes: 28 additions & 16 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.14.2'
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:2.0.0'
classpath 'com.diffplug.spotless:spotless-plugin-gradle:6.13.0' // above this version requires Java 11
classpath 'com.diffplug.spotless:spotless-plugin-gradle:6.23.3'
}
}
apply plugin: 'pl.allegro.tech.build.axion-release'
Expand Down Expand Up @@ -39,7 +39,7 @@ tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(8))
languageVersion.set(JavaLanguageVersion.of(11))
}
}
doFirst {
Expand All @@ -55,20 +55,26 @@ dependencies {
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.xml.bind:jaxb-api:2.3.1'
compileOnly 'javax.validation:validation-api:2.0.1.Final'
// 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 event be using JPA or JAXB at all
compileOnly 'jakarta.persistence:jakarta.persistence-api:3.1.0'
compileOnly 'jakarta.xml.bind:jakarta.xml.bind-api:4.0.0'
compileOnly 'jakarta.validation:jakarta.validation-api:3.0.2'
Comment on lines +58 to +62
Copy link

Choose a reason for hiding this comment

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

💡 Codebase verification

Remaining javax.* Imports Detected

The following files still contain imports from javax.* packages:

  • src/main/java/com/prowidesoftware/swift/utils/SafeXmlUtils.java
  • src/main/java/com/prowidesoftware/swift/io/parser/XMLParser.java

Please update these imports to their corresponding jakarta.* packages to ensure compatibility and prevent potential ClassNotFoundException or compilation errors.

🔗 Analysis chain

Ensure All Code Imports Are Updated to 'jakarta.*' Packages

The dependencies have been updated from javax.* to jakarta.* packages:

  • jakarta.persistence:jakarta.persistence-api:3.1.0
  • jakarta.xml.bind:jakarta.xml.bind-api:4.0.0
  • jakarta.validation:jakarta.validation-api:3.0.2

Please verify that all code imports and usages have been updated accordingly to prevent ClassNotFoundException or compilation errors.

Run the following script to find any remaining javax.* imports in the main source code:

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Find imports from 'javax' packages in the main source code.

# Expected: No imports from 'javax' packages.

rg --type java '^import javax\.' src/main/java/

Length of output: 1099


testImplementation 'javax.validation:validation-api:2.0.1.Final'
testImplementation 'javax.persistence:javax.persistence-api:2.2'
testImplementation 'jakarta.persistence:jakarta.persistence-api:3.1.0'
testImplementation 'jakarta.validation:jakarta.validation-api:3.1.0'
Comment on lines +64 to +65
Copy link

Choose a reason for hiding this comment

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

💡 Codebase verification

Remaining javax.* Imports Detected in Test Code

The following test files still contain imports from javax.* packages:

  • src/test/java/com/prowidesoftware/swift/utils/SafeXmlUtilsTest.java

    • import javax.xml.XMLConstants;
    • import javax.xml.parsers.DocumentBuilder;
    • import javax.xml.stream.XMLInputFactory;
    • import javax.xml.stream.XMLStreamException;
    • import javax.xml.stream.XMLStreamReader;
    • import javax.xml.transform.Transformer;
    • import javax.xml.transform.TransformerException;
    • import javax.xml.transform.stream.StreamResult;
    • import javax.xml.transform.stream.StreamSource;
    • import javax.xml.validation.Schema;
    • import javax.xml.validation.SchemaFactory;
  • src/test/java/com/prowidesoftware/swift/io/parser/XMLParserTest.java

    • import javax.xml.parsers.DocumentBuilder;

Please update these imports to use jakarta.* packages to ensure consistency with the updated test dependencies.

🔗 Analysis chain

Ensure Test Code Imports Are Updated to 'jakarta.*' Packages

The test dependencies have also been updated to use jakarta.* packages:

  • jakarta.persistence:jakarta.persistence-api:3.1.0
  • jakarta.validation:jakarta.validation-api:3.1.0

Please verify that all test code imports and usages have been updated to match these dependencies.

Run the following script to find any remaining javax.* imports in the test source code:

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Find imports from 'javax' packages in the test source code.

# Expected: No imports from 'javax' packages.

rg --type java '^import javax\.' src/test/java/

Length of output: 1371

testImplementation('org.junit.jupiter:junit-jupiter:5.8.2')
testImplementation group: 'org.assertj', name: 'assertj-core', version: '3.22.0'
testImplementation group: 'org.xmlunit', name: 'xmlunit-core', version: '2.9.0'
testImplementation group: 'org.xmlunit', name: 'xmlunit-matchers', version: '2.9.0'
testImplementation group: 'org.xmlunit', name: 'xmlunit-assertj', version: '2.9.0'
}

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

test {
useJUnitPlatform()
Expand All @@ -83,8 +89,8 @@ tasks.withType(Jar) {
'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.core'
)
Expand Down Expand Up @@ -259,7 +265,7 @@ tasks.register('bundle', Jar) {
from ("$buildDir/libs") {
include '*.asc'
}
archiveName 'bundle.jar'
archiveFileName.set('bundle.jar')
}

tasks.withType(Test) {
Expand All @@ -282,9 +288,15 @@ task('testOn17', type: Test) {

jacocoTestReport {
reports {
xml.enabled true
csv.enabled false
html.enabled false
xml {
required.set(true)
}
csv {
required.set(false)
}
html {
required.set(false)
}
}

// exclude generated code
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 @@ -17,12 +17,12 @@

import static java.lang.annotation.ElementType.*;

import jakarta.validation.Constraint;
import jakarta.validation.Payload;
import java.lang.annotation.Documented;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import javax.validation.Constraint;
import javax.validation.Payload;

/**
* Bean validation for BIC numbers.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@

import com.prowidesoftware.swift.model.BIC;
import com.prowidesoftware.swift.model.BicValidationResult;
import javax.validation.ConstraintValidator;
import javax.validation.ConstraintValidatorContext;
import jakarta.validation.ConstraintValidator;
import jakarta.validation.ConstraintValidatorContext;
import org.apache.commons.lang3.StringUtils;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@

import static java.lang.annotation.ElementType.*;

import jakarta.validation.Constraint;
import jakarta.validation.Payload;
import java.lang.annotation.Documented;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import javax.validation.Constraint;
import javax.validation.Payload;

/**
* Bean validation for ISO Alpha-2 country codes.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
package com.prowidesoftware.swift.constraints;

import com.prowidesoftware.swift.utils.IsoUtils;
import javax.validation.ConstraintValidator;
import javax.validation.ConstraintValidatorContext;
import jakarta.validation.ConstraintValidator;
import jakarta.validation.ConstraintValidatorContext;
import org.apache.commons.lang3.StringUtils;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@

import static java.lang.annotation.ElementType.*;

import jakarta.validation.Constraint;
import jakarta.validation.Payload;
import java.lang.annotation.Documented;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import javax.validation.Constraint;
import javax.validation.Payload;

/**
* Bean validation for ISO currency codes.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
package com.prowidesoftware.swift.constraints;

import com.prowidesoftware.swift.utils.IsoUtils;
import javax.validation.ConstraintValidator;
import javax.validation.ConstraintValidatorContext;
import jakarta.validation.ConstraintValidator;
import jakarta.validation.ConstraintValidatorContext;
import org.apache.commons.lang3.StringUtils;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@

import static java.lang.annotation.ElementType.*;

import jakarta.validation.Constraint;
import jakarta.validation.Payload;
import java.lang.annotation.Documented;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import javax.validation.Constraint;
import javax.validation.Payload;

/**
* Bean validation for IBAN numbers.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@

import com.prowidesoftware.swift.model.IBAN;
import com.prowidesoftware.swift.model.IbanValidationResult;
import javax.validation.ConstraintValidator;
import javax.validation.ConstraintValidatorContext;
import jakarta.validation.ConstraintValidator;
import jakarta.validation.ConstraintValidatorContext;
import org.apache.commons.lang3.StringUtils;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@
import com.prowidesoftware.deprecation.ProwideDeprecated;
import com.prowidesoftware.deprecation.TargetYear;
import com.prowidesoftware.swift.utils.Lib;
import jakarta.persistence.*;
import jakarta.xml.bind.annotation.XmlTransient;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.io.Serializable;
import java.math.BigDecimal;
import java.text.NumberFormat;
import java.util.*;
import javax.persistence.*;
import javax.xml.bind.annotation.XmlTransient;
import org.apache.commons.lang3.ArrayUtils;
import org.apache.commons.lang3.StringUtils;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,16 @@
import com.prowidesoftware.swift.model.mt.AbstractMT;
import com.prowidesoftware.swift.model.mt.DefaultMtMetadataStrategy;
import com.prowidesoftware.swift.model.mt.MTVariant;
import jakarta.persistence.Column;
import jakarta.persistence.DiscriminatorValue;
import jakarta.persistence.Entity;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.util.Calendar;
import java.util.Objects;
import java.util.Optional;
import java.util.logging.Level;
import javax.persistence.Column;
import javax.persistence.DiscriminatorValue;
import javax.persistence.Entity;
import org.apache.commons.lang3.EnumUtils;
import org.apache.commons.lang3.StringUtils;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
*/
package com.prowidesoftware.swift.model;

import jakarta.persistence.*;
import java.util.Calendar;
import javax.persistence.*;

/**
* Comments associated to a message for application only usage (not part of the standard).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
*/
package com.prowidesoftware.swift.model;

import static javax.persistence.FetchType.LAZY;
import static jakarta.persistence.FetchType.LAZY;

import jakarta.persistence.*;
import java.util.Calendar;
import java.util.Objects;
import javax.persistence.*;

/**
* A revision is a snapshot of message content and is used to track the history of changes in a message.
Expand Down
Loading
Loading