-
Notifications
You must be signed in to change notification settings - Fork 1
Upgrade to DynamiaTools 5.4.7 with support for ThreadLocalObjectContainer #18
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
Conversation
…r enhanced cloning capabilities Signed-off-by: Mario Serrano <[email protected]>
…for entityfiles Signed-off-by: Mario Serrano <[email protected]>
…cumentation across multiple classes Signed-off-by: Mario Serrano <[email protected]>
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.
Pull request overview
This PR upgrades the SaaS module from version 3.4.4 to 3.5.0, incorporating DynamiaTools 5.4.7 with enhanced ThreadLocalObjectContainer support for better multi-threaded operations in multi-tenant environments. The upgrade also includes Spring Boot 3.5.8 and entity files 7.5.0.
Key changes:
- Integration of
ThreadLocalObjectContainerandCloneableThreadLocalObjectfor improved thread-local session management in theAccountSessionHolder - Code quality improvements including final modifiers, modern Java patterns (instanceof pattern matching), and simplified control flow
- Comprehensive JavaDoc documentation added to all API interfaces for better developer experience
Reviewed changes
Copilot reviewed 34 out of 34 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| sources/pom.xml | Updated parent version to 3.5.0, upgraded DynamiaTools to 5.4.7, entityfiles to 7.5.0, and Spring Boot to 3.5.8 |
| sources/api/pom.xml | Version bump to 3.5.0 |
| sources/core/pom.xml | Version bump to 3.5.0, added tools.dynamia.integration dependency for ThreadLocalObjectContainer support |
| sources/jpa/pom.xml | Version bump to 3.5.0 with updated internal dependencies |
| sources/remote/pom.xml | Version bump to 3.5.0 with updated internal dependencies |
| sources/ui/pom.xml | Version bump to 3.5.0 |
| sources/core/src/main/java/tools/dynamia/modules/saas/AccountSessionHolder.java | Implemented CloneableThreadLocalObject, added clone() method, switched to ThreadLocalObjectContainer for session retrieval |
| sources/core/src/main/java/tools/dynamia/modules/saas/AccountRequestFilter.java | Refactored to use pattern matching for instanceof (Java 16+) |
| sources/core/src/main/java/tools/dynamia/modules/saas/domain/Account.java | Simplified toString() call in print statement |
| sources/core/src/test/java/tools/dynamia/modules/saas/AccountTest.java | Simplified assertion from 0 + 1 to 1 |
| sources/core/src/main/java/tools/dynamia/modules/saas/domain/enums/*.java | Removed unnecessary trailing semicolons from simple enum declarations |
| sources/remote/src/main/java/tools/dynamia/modules/saas/remote/RemoteAccountServiceAPI.java | Refactored StringBuilder to String concatenation for simpler code |
| sources/ui/src/main/java/tools/dynamia/modules/saas/ui/vm/AccountProfileCrudVM.java | Added final modifiers to immutable fields, replaced Arrays.asList with Collections.singletonList |
| sources/ui/src/main/java/tools/dynamia/modules/saas/ui/controllers/AccountProfileController.java | Added final modifier and removed unnecessary cast |
| sources/ui/src/main/java/tools/dynamia/modules/saas/ui/action/ViewAccountLogAction.java | Removed early return statement (potential bug) |
| sources/ui/src/main/java/tools/dynamia/modules/saas/ui/AccountNavigationRestriction.java | Simplified if-else to single return statement |
| sources/api/src/main/java/tools/dynamia/modules/saas/api/*.java | Added comprehensive JavaDoc documentation to all API interfaces and classes |
| sources/api/src/main/java/tools/dynamia/modules/saas/api/dto/*.java | Added final modifiers to immutable DTO fields |
| sources/api/src/main/java/tools/dynamia/modules/saas/api/AccountAPIConfig.java | Removed unused import, improved JavaDoc |
| sources/api/src/main/java/tools/dynamia/modules/saas/api/enums/AccountStatus.java | Removed trailing semicolon from enum |
| sources/api/src/main/java/tools/dynamia/modules/saas/api/enums/AccountPeriodicity.java | Added final modifier to days field |
Comments suppressed due to low confidence (1)
sources/ui/src/main/java/tools/dynamia/modules/saas/ui/action/ViewAccountLogAction.java:64
- Removing the early return after showing "No logs found" warning creates dead code. When logs are empty, the warning is shown, but then execution continues into the else block where a viewer is created with an empty list. This changes the behavior - previously the method would return after showing the warning, now it will attempt to display an empty viewer.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| public AccountSessionHolder clone() { | ||
| AccountSessionHolder accountSessionHolder = new AccountSessionHolder(service); | ||
| accountSessionHolder.currentId = this.currentId; | ||
| accountSessionHolder.accountLocale = this.accountLocale; | ||
| accountSessionHolder.accountTimeZone = this.accountTimeZone; | ||
| accountSessionHolder.currentDTO = this.currentDTO; | ||
| return accountSessionHolder; | ||
| } |
Copilot
AI
Dec 1, 2025
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.
The clone() method should be annotated with @Override since it implements CloneableThreadLocalObject. Additionally, the cloned instance passes the service field to the constructor, but this field may be null (it's lazily initialized in getService()). Consider either cloning after ensuring service is initialized, or handling null service in the clone appropriately.
No description provided.