Skip to content
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

Merged
merged 5 commits into from
May 27, 2022
Merged

Update spotbugs 4.6.0 -> 4.7.0 #2222

merged 5 commits into from
May 27, 2022

Conversation

Scottmitch
Copy link
Member

No description provided.

@Scottmitch Scottmitch changed the title wip: Update spotbugs 4.6.0 -> 4.7.0 Update spotbugs 4.6.0 -> 4.7.0 May 21, 2022
@Scottmitch Scottmitch marked this pull request as ready for review May 21, 2022 17:17
@@ -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);
Copy link
Member Author

@Scottmitch Scottmitch May 21, 2022

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

Copy link
Contributor

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.

Copy link
Member

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

Copy link
Member Author

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.

Copy link
Member Author

Choose a reason for hiding this comment

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

moved to #2228

@Scottmitch Scottmitch force-pushed the find_bugs branch 3 times, most recently from 9c0ccc8 to 62f9095 Compare May 26, 2022 14:22
@@ -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",
Copy link
Member

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);
Copy link
Member

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

@Scottmitch Scottmitch merged commit 83fd27c into apple:main May 27, 2022
@Scottmitch Scottmitch deleted the find_bugs branch May 27, 2022 04:04
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.

3 participants