Skip to content

4.x: Add Streamable just overloads for 2-10 items - #8395

Merged
akarnokd merged 2 commits into
ReactiveX:4.xfrom
jimi-21:feat/streamable-just-overloads
Nov 17, 2026
Merged

akarnokd merged 2 commits into
ReactiveX:4.xfrom
jimi-21:feat/streamable-just-overloads

Conversation

@jimi-21

@jimi-21 jimi-21 commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Related #8299.

Summary

Add the Streamable.just overloads for 2 through 10 items, matching the corresponding Flowable API surface.

Each overload:

  • annotates every parameter with @NonNull;
  • checks every item eagerly with Objects.requireNonNull;
  • itemizes every parameter in the @throws NullPointerException Javadoc, as required by CheckParamValidationNamingTest;
  • delegates to the existing fromArray implementation, preserving item order and completion behavior.

Tests

Added focused coverage in StreamableJustTest for:

  • ordered output and completion for every new arity from 2 through 10;
  • null rejection for every new overload.

Test-first evidence: before adding the overloads, compileTestJava failed with 18 errors covering the new normal-output and null-rejection calls.

After the implementation and Javadoc corrections:

gradle test --tests 'io.reactivex.rxjava4.validators.CheckParamValidationNamingTest.checkStreamable' --tests 'io.reactivex.rxjava4.internal.operators.streamable.StreamableJustTest' --tests 'io.reactivex.rxjava4.internal.operators.streamable.StreamableFromArrayTest'
gradle checkstyleMain checkstyleTest

Both commands pass on Zulu JDK 26. The selected tests report 12 tests, 0 failures/errors, and 2 existing skips.

A full gradle test run after the corrections completed 14,334 tests with 918 skips and 5 failures in existing FlowableGroupByTest (4) and FlowableConcatTest (1), including timeouts and termination races outside this PR's changed Streamable code. The targeted Streamable and parameter-validation tests pass; no full-suite green result is claimed.

AI disclosure: Kimi Code assisted with checking the API checklist, implementing the overloads, writing and running the tests, and preparing this PR description. The failing-before compilation evidence, parameter-validation correction, final test results, and final two-file diff were checked.

CI result for d57b78d

Validation, the default build, JDK 28, and the security scan pass. The JDK 27 job reports 14,334 tests completed with 918 skips and one failure: FlowableWindowWithTimeTest.overlapBackpressure2. No Streamable test failed, and the failing Flowable timing test is outside the two changed files. No unrelated source changes were made to address it.

@github-actions

Copy link
Copy Markdown

🐷 TruffleHog + Entropy Beauty Scan

Average entropy of changed code: 4.801 bits/char
Verdict: ⚠️ Consider review — entropy outside sweet spot

Changed files entropy:

src/main/java/io/reactivex/rxjava4/core/Streamable.java: 4.661
src/test/java/io/reactivex/rxjava4/internal/operators/streamable/StreamableJustTest.java: 4.941

✅ No secrets or suspicious high-entropy strings found.

Mid-4 beauty heuristic in action — powered by our entropy chats! 😊

@github-actions

Copy link
Copy Markdown

🐷 TruffleHog + Entropy Beauty Scan

Average entropy of changed code: 4.802 bits/char
Verdict: ⚠️ Consider review — entropy outside sweet spot

Changed files entropy:

src/main/java/io/reactivex/rxjava4/core/Streamable.java: 4.663
src/test/java/io/reactivex/rxjava4/internal/operators/streamable/StreamableJustTest.java: 4.941

✅ No secrets or suspicious high-entropy strings found.

Mid-4 beauty heuristic in action — powered by our entropy chats! 😊

@codecov

codecov Bot commented Nov 17, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.63%. Comparing base (a6f2d16) to head (d57b78d).

Additional details and impacted files
@@             Coverage Diff              @@
##                4.x    #8395      +/-   ##
============================================
+ Coverage     98.58%   98.63%   +0.04%     
- Complexity     7169     7178       +9     
============================================
  Files           826      826              
  Lines         50972    51035      +63     
  Branches       6944     6944              
============================================
+ Hits          50251    50336      +85     
+ Misses          482      473       -9     
+ Partials        239      226      -13     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@akarnokd
akarnokd merged commit da2b9d2 into ReactiveX:4.x Nov 17, 2026
9 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants