Merged
Conversation
…r account-level time zone management
…mplement getDefaultLocale method
Signed-off-by: Mario Serrano <mario@dynamiasoluciones.com>
Contributor
There was a problem hiding this comment.
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.
Comment on lines
+137
to
+142
| public ZoneId getAccountTimeZone() { | ||
| if (accountTimeZone == null) { | ||
| accountTimeZone = ZoneId.systemDefault(); | ||
| } | ||
| return accountTimeZone; | ||
| } |
There was a problem hiding this comment.
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.
Suggested change
| 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 file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.