cleanup: convert anonymous inner classes to lambdas in test files#8178
Merged
akarnokd merged 1 commit intoJun 25, 2026
Merged
Conversation
Replace anonymous inner class usages with lambdas where the type is a functional interface and the anonymous class has no instance fields or self-references. Changes: - BlockingObservableNextTest: Thread subclass to Thread with lambda - TestSchedulerTest: Publisher anonymous class to lambda - AbstractSchedulerConcurrencyTests: Publisher anonymous class to lambda - AbstractSchedulerTests: Publisher anonymous class to lambda
🐷 TruffleHog + Entropy Beauty ScanAverage entropy of changed code: 4.735 bits/char Changed files entropy: ✅ No secrets or suspicious high-entropy strings found. Mid-4 beauty heuristic in action — powered by our entropy chats! 😊 |
akarnokd
approved these changes
Jun 25, 2026
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## 4.x #8178 +/- ##
============================================
- Coverage 98.33% 98.32% -0.02%
+ Complexity 6935 6933 -2
============================================
Files 784 784
Lines 48995 48995
Branches 6596 6596
============================================
- Hits 48179 48174 -5
- Misses 624 627 +3
- Partials 192 194 +2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Converts anonymous inner classes to lambdas in test files where the anonymous class implements a functional interface (single abstract method) and has no instance fields or self-references.
Changes in 4 files:
BlockingObservableNextTest:new Thread()subclass tonew Thread(() -> ...)TestSchedulerTest:new Publisher<Object>()to lambdaAbstractSchedulerConcurrencyTests:new Publisher<Integer>()to lambdaAbstractSchedulerTests:new Publisher<Integer>()to lambdaInner classes that use
thisfor recursive scheduling or have instance fields are intentionally kept as-is since lambdas cannot replace those.Ref: #8080