Skip to content

Conversation

@marioserrano09
Copy link
Contributor

No description provided.

…r enhanced cloning capabilities

Signed-off-by: Mario Serrano <[email protected]>
…cumentation across multiple classes

Signed-off-by: Mario Serrano <[email protected]>
Copilot AI review requested due to automatic review settings December 1, 2025 01:25
@marioserrano09 marioserrano09 merged commit 2ff8b27 into master Dec 1, 2025
3 checks passed
Copy link
Contributor

Copilot AI left a 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 ThreadLocalObjectContainer and CloneableThreadLocalObject for improved thread-local session management in the AccountSessionHolder
  • 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.

Comment on lines +146 to +153
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;
}
Copy link

Copilot AI Dec 1, 2025

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.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants