| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: d9dbeb10-cc4f-4351-8e62-cdc5aa0e68ef 📥 CommitsReviewing files that changed from the base of the PR and between db2a77a and af146d6. 📒 Files selected for processing (3)
📝 Walkthrough WalkthroughImmutableStructure gains a package-visible EMPTY static constant backed by Collections.emptyMap(). ImmutableContext constructors are updated to pass Collections.emptyMap() instead of allocating new HashMap<>(), and the two-arg constructor assigns ImmutableStructure.EMPTY when the targeting key is null and attributes are null or empty. Tests covering all four targeting-key/attributes constructor branches are added. ChangesImmutableContext/ImmutableStructure allocation optimization
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related PRs
Suggested reviewers
❌ Failed checks (1 warning)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment @coderabbitai help to get the list of available commands and usage tips. |
Sorry, something went wrong.
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## main #1972 +/- ##
============================================
+ Coverage 92.13% 93.19% +1.05%
- Complexity 662 669 +7
============================================
Files 59 59
Lines 1628 1631 +3
Branches 184 185 +1
============================================
+ Hits 1500 1520 +20
+ Misses 80 66 -14
+ Partials 48 45 -3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness.
|
Sorry, something went wrong.
Signed-off-by: Tobias Ibounig <tobias.ibounig@dynatrace.com>
haha ya, I first looked at the raw numbers and I was shocked - but still, these improvements are valid! Thanks as always. |
Sorry, something went wrong.
|
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
This PR
Related Issues
None
Notes
Before-hook implementations commonly return new ImmutableContext() to signal no context change. Each call previously allocated a throwaway HashMap as the constructor argument, then a second HashMap inside ImmutableStructure. Passing Collections.emptyMap() eliminates the first allocation; reusing ImmutableStructure.EMPTY eliminates both the ImmutableStructure and its backing map entirely.
The sharing should be fine: ImmutableStructure never mutates attributes — getValue clones values, asMap/keySet return copies.
The ConstructorBranches tests guard the targetingKey != null branch so that a future refactor cannot accidentally return EMPTY for a context that carries a targeting key.
⚠️ seems I might have used another branch as baseline instead of main. Result proportions should be right, but not the exact values.
Follow-up Tasks