Skip to content

Fix new Sonar smells for MMIH #2795

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
merged 2 commits into from
Mar 8, 2019
Merged

Conversation

artembilan
Copy link
Member

  • Fix complexity smells in the MessagingMethodInvokerHelper
  • Reuse get() in the ZookeeperMetadataStore in case of putIfAbsent() error
  • Polishing for ZookeeperMetadataStoreTests
  • Fix for hasUnqualifiedMapParameter
  • Fix findHandlerMethodsForTarget() complexity

@artembilan
Copy link
Member Author

Pay attention, please, how I have fixed ZookeeperMetadataStore

* Fix complexity smells in the `MessagingMethodInvokerHelper`
* Reuse `get()` in the `ZookeeperMetadataStore` in case of `putIfAbsent()` error
* Polishing for `ZookeeperMetadataStoreTests`
* Fix for `hasUnqualifiedMapParameter`
* Fix `findHandlerMethodsForTarget()` complexity
Copy link
Contributor

@garyrussell garyrussell left a comment

Choose a reason for hiding this comment

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

Just one typo; good work - this class has needed this for a long time.

}

private boolean isMethodEligible(Method methodToProcess) {
return !(methodToProcess.isBridge() || // NOSONAR bollean complexity
Copy link
Contributor

Choose a reason for hiding this comment

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

Typo boolean

throw new ZookeeperMetadataStoreException("Exception while reading node with key '" + key + "':",
exceptionDuringGet);
}
return get(key);
Copy link
Member Author

Choose a reason for hiding this comment

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

Gary, is this fix OK with you?
Because we would need to back-port it anyway.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, it looks fine; I'll backport it along with the other bugs in ZK from my Sonar fixes.

@artembilan
Copy link
Member Author

Looks like I forgot to push the fix you had requested.

@artembilan artembilan requested a review from garyrussell March 8, 2019 17:25
@garyrussell garyrussell merged commit b4273dd into spring-projects:master Mar 8, 2019
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.

2 participants