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

Dead stores should be removed #122

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Dead stores should be removed #122

wants to merge 1 commit into from

Conversation

AymanDF
Copy link
Contributor

@AymanDF AymanDF commented Mar 17, 2016

This pull request is focused on resolving occurrences of Sonar rule squid:S1854 - “ Dead stores should be removed ”. You can find more information about the issue here:
https://dev.eclipse.org/sonar/rules/show/squid:S1854
Please let me know if you have any questions.
Ayman Abdelghany.

@@ -219,7 +219,7 @@ public KeyValue getKeyValue(String KeyURI) throws EmbeddedJmxTransException {
}

private URL[] makeEtcdBaseUris(String etcdURI) throws EmbeddedJmxTransException {
String serverList = null;
String serverList;
Copy link
Member

Choose a reason for hiding this comment

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

This is probably a good candidate for a method extraction and the removal of the conditional assignment. This would IMHO bring more clarity than just removing the dead store.

@cyrille-leclerc
Copy link
Member

@AymanDF sorry but I prefer to let the author of the code decide of the style of the code for things such as initialization to zero as I personally think that it helps readability.

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