| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
There was a problem hiding this comment.
This pull request simplifies the retrieval and validation of returnedEvalContext in HookSupport.java by directly assigning the result of hook.before and checking for null and presence. The reviewer suggested refactoring the code to use ifPresent instead of the isPresent() and get() pattern to make it more idiomatic and readable.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
Sorry, something went wrong.
|
Hey - there's an issue with the codecov action (some keys are no longer available) which has been fixed on main; rebasing this PR should fix it. cc @chrfwow |
Sorry, something went wrong.
Signed-off-by: Tobias Ibounig <tobias.ibounig@dynatrace.com>
Signed-off-by: Todd Baert <todd.baert@dynatrace.com>
|
Added a supression. |
Sorry, something went wrong.
|
Sorry, something went wrong.
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## main #1955 +/- ##
============================================
+ Coverage 92.26% 93.26% +0.99%
- Complexity 653 657 +4
============================================
Files 59 59
Lines 1591 1589 -2
Branches 179 179
============================================
+ Hits 1468 1482 +14
+ Misses 76 62 -14
+ Partials 47 45 -2
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.
| Back | FazBrowse Home | New Git URL |
This PR
Related Issues
None
Notes
The previous pattern wrapped the return value of hook.before() in Optional.ofNullable() to guard against null returns (which are non-standard but possible). This created up to two temporary Optional objects per hook call. The replacement assigns the return value directly and guards with an explicit != null check, which is semantically equivalent.
Allocation impact is negligible, but reduces on totalAllocatedInstances can be seen.
Follow-up Tasks
-More PRs with memory improvements