Context tests and implementation improvement proposals#11837
Context tests and implementation improvement proposals#11837PerfectSlayer wants to merge 6 commits into
Conversation
This will help with readability when building complex sequence of events
|
Hi! 👋 Thanks for your pull request! 🎉 To help us review it, please make sure to:
If you need help, please check our contributing guidelines. |
This comment has been minimized.
This comment has been minimized.
🟢 Java Benchmark SLOs — All performance SLOs passed
PR vs. master results
Commit: Load and DaCapo benchmarks can be triggered manually in the GitLab pipeline. Results will appear in the Benchmarking Platform UI after completion. |
| * Swaps {@code from} {@link Context} by {@code to} {@link Context} on the given holder, notifying | ||
| * listeners. |
There was a problem hiding this comment.
How about calling them beforeSwap and context to match the callers.
Could also trim the comment to:
| * Swaps {@code from} {@link Context} by {@code to} {@link Context} on the given holder, notifying | |
| * listeners. | |
| * Swaps {@code beforeSwap} with {@code context} in the given {@link Context} holder, notifying listeners. |
Other options include detach and attach etc...
There was a problem hiding this comment.
also should we call the method doSwap to distinguish it from the public method?
There was a problem hiding this comment.
Done in aacfd50
I can also drop the whole Javadoc as it's internal private method. I was a bit hesitant between dropping it or having a full Javadoc (with all @param). So I ended up with this in between solution with @code which is not the best either 🤷
EDIT:
also should we call the method doSwap to distinguish it from the public method?
This one loaded after the first fix. I dropped the Javadoc comment because it felt explicit enough using the new method name, thanks
df3b9b1 to
c8f6c1f
Compare
c8f6c1f to
aacfd50
Compare
There was a problem hiding this comment.
I can see the intent behind the changes - but I'm getting mixed results from ContextManagerBenchmark which I'd like to investigate before approving (basically want to make sure it's just noise and not a real difference.)
Perhaps the test improvements could be separated out into their own PR?
|
Sure, I created #11839 with only the changes from tests, |
What Does This Do
This PR is a proposal of few refactoring changes:
@NonNullannotation on ContextManager implementation in coreMotivation
Those are proposals. Let me know which one you agree with and want to get merged, and which one should I drop from this branch.
Additional Notes
I planned to push this feedback early but I discovered the issue with code coverage in the meantime.
Contributor Checklist
type:and (comp:orinst:) labels in addition to any other useful labelsclose,fix, or any linking keywords when referencing an issueUse
solvesinstead, and assign the PR milestone to the issue/merge. You can also:/merge --commit-message "..."/merge -c/merge -f --reason "reason"; please use this judiciously, as some checks do not run at the PR-level (note: the PR still needs to be mergeable, this will only skip the pre-merge build)Jira ticket: [PROJ-IDENT]