Skip to content

[cleanup][broker]remove unnecessary variable#17768

Merged
lhotari merged 3 commits into
apache:masterfrom
lordcheng10:clean_code_remove_unused_policiesCache
Sep 22, 2022
Merged

[cleanup][broker]remove unnecessary variable#17768
lhotari merged 3 commits into
apache:masterfrom
lordcheng10:clean_code_remove_unused_policiesCache

Conversation

@lordcheng10

@lordcheng10 lordcheng10 commented Sep 21, 2022

Copy link
Copy Markdown
Contributor

Motivation

Variable policiesCache in NamespaceBundleFactory is not used.
Variable bundleFactory_ in OwnershipCache is not used.

Documentation

  • doc-required
    (Your PR needs to update docs and you will update later)

  • doc-not-needed
    (Please explain why)

  • doc
    (Your PR contains doc changes)

  • doc-complete
    (Docs have been already added)

Matching PR in forked repository

PR in forked repository:
lordcheng10#12

@lhotari

lhotari commented Sep 22, 2022

Copy link
Copy Markdown
Member

Just wondering if you could run the unused variable inspection for the whole code base and make a single PR to fix that?

It's possible to use Errorprone for scanning unused variables & fields. There's errorprone maven profile in Pulsar's maven build to enable errorprone.

@lordcheng10 lordcheng10 changed the title [cleanup][broker]remove unnecessary variable in NamespaceBundleFactory [cleanup][broker]remove unnecessary variable Sep 22, 2022
@lordcheng10

lordcheng10 commented Sep 22, 2022

Copy link
Copy Markdown
Contributor Author

Just wondering if you could run the unused variable inspection for the whole code base and make a single PR to fix that?

It's possible to use Errorprone for scanning unused variables & fields. There's errorprone maven profile in Pulsar's maven build to enable errorprone.

OK, I create a new PR to check all unused variables for the whole code.

@lhotari
lhotari merged commit cb7ac2f into apache:master Sep 22, 2022
BewareMyPower added a commit to BewareMyPower/pulsar that referenced this pull request Apr 11, 2024
… creating OwnershipCache

### Motivation

apache#11012 removes all uses of the
`NamespaceBundleFactory` field in `OwnershipCache` and
apache#17768 removes that field. However,
the constructor of `OwnershipCache` still has the
`NamespaceBundleFactory` parameter.

### Modifications

Remove that parameter from the constructor.
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants