-
Notifications
You must be signed in to change notification settings - Fork 1
Upgrade to DynamiaTools v5.4.1 #15
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 account-level time zone management
…mplement getDefaultLocale method
Signed-off-by: Mario Serrano <mario@dynamiasoluciones.com>
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.1 to 3.4.2, adds account-level time zone resolution capabilities, and updates key dependencies including DynamiaTools to v5.4.1 and Spring Boot to v3.5.5.
- Added
AccountTimeZoneProviderclass for account-specific time zone handling in SaaS environments - Enhanced
AccountSessionHolderwith time zone loading and improved locale handling with better error management - Updated all Maven module versions and key dependency versions for consistency
Reviewed Changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| sources/pom.xml | Updated parent version, DynamiaTools to 5.4.1, and Spring Boot to 3.5.5 |
| sources/core/src/main/java/tools/dynamia/modules/saas/AccountTimeZoneProvider.java | New provider class for account-level time zone resolution |
| sources/core/src/main/java/tools/dynamia/modules/saas/AccountSessionHolder.java | Added time zone loading and refactored locale loading with error handling |
| sources/core/src/main/java/tools/dynamia/modules/saas/AccountLocaleProvider.java | Enhanced Javadoc documentation for clarity |
| sources/ui/pom.xml | Updated parent and module versions to 3.4.2 |
| sources/remote/pom.xml | Updated parent and dependency versions to 3.4.2 |
| sources/jpa/pom.xml | Updated parent and dependency versions to 3.4.2 |
| sources/core/pom.xml | Updated parent, module, and dependency versions to 3.4.2 |
| sources/api/pom.xml | Updated parent and module versions to 3.4.2 |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| public ZoneId getAccountTimeZone() { | ||
| if (accountTimeZone == null) { | ||
| accountTimeZone = ZoneId.systemDefault(); | ||
| } | ||
| return accountTimeZone; | ||
| } |
Copilot
AI
Aug 24, 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 method getAccountTimeZone() always returns a non-null value by falling back to system default, but this behavior should be documented in the method's Javadoc to clarify the fallback behavior for API consumers.
| public ZoneId getAccountTimeZone() { | |
| if (accountTimeZone == null) { | |
| accountTimeZone = ZoneId.systemDefault(); | |
| } | |
| return accountTimeZone; | |
| } | |
| /** | |
| * Returns the account's time zone. If the account time zone is not set, | |
| * this method falls back to the system default time zone ({@link ZoneId#systemDefault()}). | |
| * This method never returns {@code null}. | |
| * | |
| * @return the account's time zone, or the system default if not set | |
| */ | |
| public ZoneId getAccountTimeZone() { | |
| if (accountTimeZone == null) { | |
| accountTimeZone = ZoneId.systemDefault(); | |
| } | |
| return accountTimeZone; | |
| } |
This pull request introduces support for account-level time zone resolution in the SaaS module, alongside improvements to locale handling and project dependency updates. The main change is the addition of a new provider for account time zones, which complements the existing locale provider and ensures that both locale and time zone can be resolved per account session. Additionally, all Maven module versions and key dependencies have been updated for consistency and to keep the project current.
Account Session Enhancements
AccountTimeZoneProviderclass that supplies the default time zone based on the current account session, similar to how locale is resolved. This enables account-specific time zone handling for SaaS environments.AccountSessionHolderto store and resolveZoneIdfor the account, including logic to load the time zone from the account and fall back to the system default if not set. Also refactored locale loading for clarity and error handling.Provider Documentation
AccountLocaleProviderto clarify its purpose, usage, and priority in locale resolution.Dependency and Version Updates
3.4.1to3.4.2inpom.xmlfiles across the codebase, ensuring consistency and compatibility.dynamiatools.versionto5.4.1andspringboot.versionto3.5.5in the rootpom.xml.