Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Replace RuntimeIOException with UncheckedIOException #13090

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
May 7, 2025

Conversation

gregw
Copy link
Contributor

@gregw gregw commented May 5, 2025

use the standard UncheckedIoException rather than our own

@gregw gregw requested review from lachlan-roberts and sbordet May 5, 2025 00:56
@gregw gregw moved this to 👀 In review in Jetty 12.1.0 May 5, 2025
@gregw gregw requested a review from lachlan-roberts May 5, 2025 12:06
Copy link
Contributor

@joakime joakime left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you still have a bug in the fcgi Flusher with the cause local variable use.

Copy link
Contributor

@joakime joakime left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Noticed other things that might need improvement too.

@gregw gregw requested review from sbordet and joakime May 5, 2025 22:00
@@ -127,7 +126,7 @@ public Callback join()
{
Throwable cause = getCause();
ExceptionUtil.addSuppressedIfNotAssociated(cause, x);
throw new RuntimeIOException(cause);
throw ExceptionUtil.asRuntime(cause == null ? x : cause);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here, throw new RuntimeException(cause) is clearer and shorter.

Copy link
Contributor Author

@gregw gregw May 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sbordet But cause might be null, in which case a NPE will be thrown and x will be lost. I'll handle the null case separately above.

@gregw gregw requested a review from sbordet May 6, 2025 23:00
@gregw gregw merged commit dcee07f into jetty-12.1.x May 7, 2025
10 checks passed
@github-project-automation github-project-automation bot moved this from 👀 In review to ✅ Done in Jetty 12.1.0 May 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

4 participants