-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Conversation
...ore/jetty-fcgi/jetty-fcgi-client/src/main/java/org/eclipse/jetty/fcgi/generator/Flusher.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this 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.
...ore/jetty-fcgi/jetty-fcgi-client/src/main/java/org/eclipse/jetty/fcgi/generator/Flusher.java
Outdated
Show resolved
Hide resolved
jetty-core/jetty-util/src/main/java/org/eclipse/jetty/util/ExceptionUtil.java
Outdated
Show resolved
Hide resolved
jetty-core/jetty-util/src/main/java/org/eclipse/jetty/util/ExceptionUtil.java
Outdated
Show resolved
Hide resolved
jetty-core/jetty-io/src/main/java/org/eclipse/jetty/io/ByteArrayEndPoint.java
Outdated
Show resolved
Hide resolved
jetty-core/jetty-io/src/main/java/org/eclipse/jetty/io/NegotiatingClientConnection.java
Outdated
Show resolved
Hide resolved
jetty-core/jetty-io/src/main/java/org/eclipse/jetty/io/RuntimeIOException.java
Outdated
Show resolved
Hide resolved
...-ee10/jetty-ee10-servlet/src/main/java/org/eclipse/jetty/ee10/servlet/ServletApiRequest.java
Show resolved
Hide resolved
...1/jetty-ee11-proxy/src/test/java/org/eclipse/jetty/ee11/proxy/AsyncMiddleManServletTest.java
Show resolved
Hide resolved
...-ee11/jetty-ee11-servlet/src/main/java/org/eclipse/jetty/ee11/servlet/ServletApiRequest.java
Show resolved
Hide resolved
...ee9/jetty-ee9-proxy/src/test/java/org/eclipse/jetty/ee9/proxy/AsyncMiddleManServletTest.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this 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.
jetty-core/jetty-http/src/main/java/org/eclipse/jetty/http/MimeTypes.java
Show resolved
Hide resolved
jetty-core/jetty-io/src/main/java/org/eclipse/jetty/io/ByteArrayEndPoint.java
Outdated
Show resolved
Hide resolved
@@ -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); |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
use the standard UncheckedIoException rather than our own