Skip to content

Address technical debt and improve safety in domain flows and models - #3065

Merged
CydeWeys merged 3 commits into
google:masterfrom
CydeWeys:various-fixes
May 27, 2026
Merged

Address technical debt and improve safety in domain flows and models#3065
CydeWeys merged 3 commits into
google:masterfrom
CydeWeys:various-fixes

Conversation

@CydeWeys

@CydeWeys CydeWeys commented May 27, 2026

Copy link
Copy Markdown
Member
  • Addressed unhandled empty lists and swallowed exceptions in DomainFlowTmchUtils.
  • Improved null safety and immutability guarantees in Fee and LaunchPhase.
  • Applied defensive copying in FeeTransformResponseExtension. Note: This uses the forceEmptyToNull(nullToEmptyImmutableCopy(...)) pattern. This defensive copy ensures immutability, while forceEmptyToNull is required because JAXB will serialize an empty collection as an empty XML tag (which violates EPP XML schemas). Setting it to null ensures JAXB omits the tag entirely.
  • Corrected JAXB property suppression in FeeCheckResponseExtensionItemStdV1.

This change is Reviewable

@CydeWeys
CydeWeys requested a review from weiminyu May 27, 2026 18:27

@weiminyu weiminyu left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@weiminyu reviewed 6 files and all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on CydeWeys).

@CydeWeys
CydeWeys enabled auto-merge May 27, 2026 18:35
Comment thread core/src/main/java/google/registry/model/domain/launch/LaunchPhase.java Dismissed
CydeWeys added 3 commits May 27, 2026 16:47
- Addressed unhandled empty lists and swallowed exceptions in DomainFlowTmchUtils.
- Improved null safety and immutability guarantees in Fee and LaunchPhase.
- Applied defensive copying in FeeTransformResponseExtension.
  Note: This uses the forceEmptyToNull(nullToEmptyImmutableCopy(...))
  pattern. This defensive copy ensures immutability, while forceEmptyToNull
  is required because JAXB will serialize an empty collection as an empty
  XML tag (which violates EPP XML schemas). Setting it to null ensures
  JAXB omits the tag entirely.
- Corrected JAXB property suppression in FeeCheckResponseExtensionItemStdV1.
Added checks for:
- Incorrect @nullable imports.
- Unstatically imported utility methods (DateTimeUtils/CacheUtils).
- Redundant transaction wrapping (tm().transact -> tm().reTransact).
- Mutable collection instantiations (ArrayList/HashMap).
content = file.read()
if expected_header not in content:
log_error(f"Missing or incorrect copyright year in {f}. Expected: {expected_header}")
except FileNotFoundError:
@CydeWeys

Copy link
Copy Markdown
Member Author

PTAL, had to change a file.

@CydeWeys
CydeWeys added this pull request to the merge queue May 27, 2026
Merged via the queue into google:master with commit 2bc0734 May 27, 2026
14 of 15 checks passed
@CydeWeys
CydeWeys deleted the various-fixes branch May 27, 2026 22:37
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.

3 participants