-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[cleanup][pulsar-functions] Remove compiler warnings for return from finally #16451
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
zymap
merged 2 commits into
apache:master
from
teabot:cleanup-return-in-finally-warning
Aug 11, 2022
Merged
[cleanup][pulsar-functions] Remove compiler warnings for return from finally #16451
zymap
merged 2 commits into
apache:master
from
teabot:cleanup-return-in-finally-warning
Aug 11, 2022
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
merlimat
approved these changes
Jul 8, 2022
Contributor
Author
|
/pulsarbot run-failure-checks |
Refactor code so that return occurs outside of finally blocks
6f18371 to
c2c2a77
Compare
merlimat
reviewed
Jul 13, 2022
pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/SchedulerManager.java
Outdated
Show resolved
Hide resolved
…ons/worker/SchedulerManager.java
Contributor
|
/pulsarbot run-failure-checks |
codelipenghui
approved these changes
Jul 13, 2022
Contributor
Author
|
/pulsarbot rerun-failure-checks |
Demogorgon314
approved these changes
Aug 10, 2022
coderzc
pushed a commit
to coderzc/pulsar
that referenced
this pull request
Aug 13, 2022
…finally (apache#16451) ### Motivation To reduce warnings generated during compilation by cleaning up the code. ``` [WARNING] /Users/ewest/git/pulsar/pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/SchedulerManager.java:[334,9] finally clause cannot complete normally [WARNING] /Users/ewest/git/pulsar/pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/SchedulerManager.java:[642,9] finally clause cannot complete normally ``` ### Modifications * Moved `return` from `finally` blocks * Simplified code through the use of simpler, equivalent language constructs * Made some constant fields `final` Co-authored-by: Matteo Merli <mmerli@apache.org>
Technoboy-
pushed a commit
to merlimat/pulsar
that referenced
this pull request
Aug 16, 2022
…finally (apache#16451) ### Motivation To reduce warnings generated during compilation by cleaning up the code. ``` [WARNING] /Users/ewest/git/pulsar/pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/SchedulerManager.java:[334,9] finally clause cannot complete normally [WARNING] /Users/ewest/git/pulsar/pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/SchedulerManager.java:[642,9] finally clause cannot complete normally ``` ### Modifications * Moved `return` from `finally` blocks * Simplified code through the use of simpler, equivalent language constructs * Made some constant fields `final` Co-authored-by: Matteo Merli <mmerli@apache.org>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
doc-not-needed
Your PR changes do not impact docs
type/cleanup
Code or doc cleanups e.g. remove the outdated documentation or remove the code no longer in use
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
To reduce warnings generated during compilation by cleaning up the code.
Modifications
returnfromfinallyblocksfinalVerifying this change
This change is a trivial rework / code cleanup without any test coverage.
Does this pull request potentially affect one of the following parts:
Documentation
doc-required(Your PR needs to update docs and you will update later)
doc-not-neededNon functional change
doc(Your PR contains doc changes)
doc-complete(Docs have been already added)