-
Notifications
You must be signed in to change notification settings - Fork 183
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
Update spotbugs 4.6.0 -> 4.7.0 #2222
Conversation
@@ -157,7 +158,7 @@ private static void shutdownExecutor(java.util.concurrent.Executor jdkExecutor) | |||
try { | |||
((AutoCloseable) jdkExecutor).close(); | |||
} catch (Exception e) { | |||
throw new RuntimeException("unexpected exception while closing executor: " + jdkExecutor, e); | |||
throwException(e); |
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.
most cases I added an exception to ignore the new spotbugs warnings, but some cases were either expected to be rare or otherwise seemed to make sense to re-throw or choose to use some other unchecked exception
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.
This will potentially change the type of the exception thrown. Wrapping the exception as a RuntimeException
is gross, but it is at least consistent.
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.
both ways are not ideal, don't have any strong preference
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 will revert the change for this PR and submit in a followup for discussion and to make it more clear in release notes if we pull it in.
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.
moved to #2228
9c0ccc8
to
62f9095
Compare
@@ -148,7 +148,7 @@ public void onError(final Throwable t) { | |||
|
|||
private Subscriber checkSubscriberAndExceptions() { | |||
if (!exceptions.isEmpty()) { | |||
final RuntimeException exception = new RuntimeException("Unexpected exception(s) encountered", | |||
final IllegalStateException exception = new IllegalStateException("Unexpected exception(s) encountered", |
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.
If it's a test utility, should we use AssertionError
in this case for TestCompletable
, TestSingle
, and TestPublisher
?
@@ -157,7 +158,7 @@ private static void shutdownExecutor(java.util.concurrent.Executor jdkExecutor) | |||
try { | |||
((AutoCloseable) jdkExecutor).close(); | |||
} catch (Exception e) { | |||
throw new RuntimeException("unexpected exception while closing executor: " + jdkExecutor, e); | |||
throwException(e); |
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.
both ways are not ideal, don't have any strong preference
No description provided.