Skip to content

fix(mapping): replace double brace initialization in timezone generator - #152

Merged
nickkkccc merged 1 commit into
tarantool:masterfrom
Reactivity512:fix(jackson-mapping)/timezone-generator
Nov 5, 2026
Merged

nickkkccc merged 1 commit into
tarantool:masterfrom
Reactivity512:fix(jackson-mapping)/timezone-generator

Conversation

@Reactivity512

Copy link
Copy Markdown
Contributor

What has been done? Why? What problem is being solved?
This PR updates the gen-timezones.sh script to generate TarantoolTimezones.java without using the "Double Brace Initialization" anti-pattern.

Why is this change needed?
Code Quality: Double brace initialization creates unnecessary anonymous inner classes and holds hidden references to the enclosing instance, posing a potential memory leak risk.

Static Analysis: This pattern is flagged by Google Error Prone (DoubleBraceInitialization), which we are currently integrating into the project to enforce higher code quality standards.

I haven't forgotten about:

  • Tests (existing tests pass, no new tests needed for build script fix)
  • Changelog (N/A)
  • Documentation (N/A)
  • JavaDoc was written (N/A)
  • Commit messages comply with the guideline
  • Cleanup the code for review. See checklist

Closes #151

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

EOF

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed, added trailing newline.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

thanks

@Reactivity512
Reactivity512 force-pushed the fix(jackson-mapping)/timezone-generator branch from 2abd824 to a1fea65 Compare November 5, 2026 17:33
@nickkkccc
nickkkccc merged commit e954851 into tarantool:master Nov 5, 2026
0 of 6 checks passed
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.

Improvement: Fix Double Brace Initialization in generated TarantoolTimezones.java

2 participants