Skip to content

Fix finish error propagation in StreamableUsing - #8312

Merged
akarnokd merged 1 commit into
ReactiveX:4.xfrom
myetcd:4.x
Sep 29, 2026
Merged

akarnokd merged 1 commit into
ReactiveX:4.xfrom
myetcd:4.x

Conversation

@myetcd

@myetcd myetcd commented Sep 29, 2026

Copy link
Copy Markdown
Contributor

StreamableUsing.finish() currently completes successfully when upstream cleanup fails but the resource cleaner succeeds. If both fail, it reports only the resource cleaner failure and loses the upstream failure.

Preserve the upstream finish failure and add any resource cleaner failure as suppressed using ExceptionHelper.unwrapAndCombine. Also correct the throwIfFatal call to check the caught cleaner exception.

Add regression tests for upstream finish failure with successful and failing resource cleanup, including verification that resource cleanup still runs after upstream finish fails.

Validation:

  • Both new regression tests fail before the fix and pass afterward.
  • All Streamable operator tests and validators pass on JDK 26: 1,146 passed, 76 skipped, no failures.

Signed-off-by: myetcd <mytech@139.com>
@github-actions

Copy link
Copy Markdown

🐷 TruffleHog + Entropy Beauty Scan

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

Changed files entropy:

src/main/java/io/reactivex/rxjava4/internal/operators/streamable/StreamableUsing.java: 4.566
src/test/java/io/reactivex/rxjava4/internal/operators/streamable/StreamableUsingTest.java: 4.875

✅ No secrets or suspicious high-entropy strings found.

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

@akarnokd
akarnokd merged commit 1493883 into ReactiveX:4.x Sep 29, 2026
6 checks passed
@codecov

codecov Bot commented Sep 29, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.59%. Comparing base (3d1247a) to head (65819d3).
⚠️ Report is 1 commits behind head on 4.x.

Additional details and impacted files
@@             Coverage Diff              @@
##                4.x    #8312      +/-   ##
============================================
- Coverage     98.61%   98.59%   -0.03%     
+ Complexity     7158     7155       -3     
============================================
  Files           824      824              
  Lines         50800    50801       +1     
  Branches       6913     6914       +1     
============================================
- Hits          50098    50088      -10     
- Misses          477      481       +4     
- Partials        225      232       +7     

☔ 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants