Repository navigation
[cleanup][broker][Modernizer] fix violations in pulsar-broker - #17172
Merged
Merged
Conversation
- set `failOnViolations`=true - fix violations except `broker` and `client` packages
- set `failOnViolations`=true - fix violations except `broker` and `client` packages
youzipi
force-pushed
the
modernizer-0819
branch
from
August 19, 2022 03:59
6503273 to
6a1bdf9
Compare
Contributor
Author
|
/pulsarbot run-failure-checks |
Contributor
Author
tisonkun
approved these changes
Aug 20, 2022
tisonkun
left a comment
Member
There was a problem hiding this comment.
Thanks for your contribution!
LGTM.
hangc0276
reviewed
Aug 23, 2022
| if (starterArguments.runBookie) { | ||
| checkNotNull(bookieConfig, "No ServerConfiguration for Bookie"); | ||
| checkNotNull(bookieStatsProvider, "No Stats Provider for Bookie"); | ||
| Objects.requireNonNull(bookieConfig, "No ServerConfiguration for Bookie"); |
Contributor
There was a problem hiding this comment.
Why change chekNotNull to Objects.requireNonNull ?
Member
There was a problem hiding this comment.
I think this decision is made in #12271 where we agree on enabling the Modernizer plugin and this is the default settings.
Besides, Guava gradually deprecates Lists.newArrayList since JDK provides it out-of-the-box. This could be the same to chekNotNull to Objects.requireNonNull.
Contributor
Author
There was a problem hiding this comment.
guava chekNotNull and jdk Objects.requireNonNull provide the same simple semantic:
if (obj == null)
throw new NullPointerException(message);
return obj;
Contributor
Author
|
ping @codelipenghui |
hangc0276
approved these changes
Aug 24, 2022
Nicklee007
pushed a commit
to Nicklee007/pulsar
that referenced
this pull request
Aug 29, 2022
…#17172) Master Issue: apache#12271 apache#16991 ### Motivation Apply Maven Modernizer plugin to enforce we move away from legacy APIs. ### Modifications - set `failOnViolations`=true - fix violations except `broker` and `client` packages
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Master Issue: #12271 #16991
Motivation
Apply Maven Modernizer plugin to enforce we move away from legacy APIs.
Modifications
failOnViolations=truebrokerandclientpackagesVerifying this change
This change is already covered by existing tests, such as (please describe tests).
Does this pull request potentially affect one of the following parts:
Documentation
doc-not-needed