Fix Observable.take scheduler annotation - #8289
Conversation
🐷 TruffleHog + Entropy Beauty ScanAverage entropy of changed code: 4.763 bits/char Changed files entropy: ✅ No secrets or suspicious high-entropy strings found. Mid-4 beauty heuristic in action — powered by our entropy chats! 😊 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## 4.x #8289 +/- ##
=========================================
Coverage 98.60% 98.61%
+ Complexity 7150 7149 -1
=========================================
Files 824 824
Lines 50791 50791
Branches 6911 6911
=========================================
+ Hits 50084 50088 +4
+ Misses 482 480 -2
+ Partials 225 223 -2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
@akarnokd: Could this also be fixed for RxJava3? |
|
This is an annotation mistake, not a functional issue or bug. I'd rather not release new 3.x versions unless a significant bug has been identified while doing 4.x |
We are using the annotations as part of a static code analysis plugin to detect function calls using unwanted schedulers. Most of our projects are using RxJava3. |
|
I had the suspicion. This is a custom plugin you can program, right? Add method-specific overrides? |
Summary
Observable.take(long, TimeUnit)fromNONEtoCOMPUTATIONtimer(time, unit)implementation, its Javadoc, and the equivalentFlowableoverloadFixes #8288
Validation
./gradlew test --tests "io.reactivex.rxjava4.validators.CheckBaseTypeAnnotationsTest" --tests "io.reactivex.rxjava4.validators.CheckJavadocForAnnotationsTest"./gradlew test --tests "io.reactivex.rxjava4.validators.*" --stacktrace --no-daemon./gradlew build --stacktrace./gradlew javadoc --stacktraceAI disclosure
This contribution was made with OpenAI Codex assistance. Codex inspected the current
4.ximplementation and contribution policy, applied the one-line annotation correction, and ran the validation listed above. The reasoning was that this overload delegates to the default computation-schedulertimer, its Javadoc already documents computation scheduling, and the equivalentFlowableoverload already usesSchedulerSupport.COMPUTATION.