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

squid:S1192 - String literals should not be duplicated #21

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

squid:S1192 - String literals should not be duplicated #21

wants to merge 1 commit into from

Conversation

m-ezzat
Copy link

@m-ezzat m-ezzat commented Mar 13, 2016

This pull request is focused on resolving occurrences of Sonar rule squid:S1192 - String literals should not be duplicated

You can find more information about the issue here: https://dev.eclipse.org/sonar/coding_rules#q=squid:S1192

Please let me know if you have any questions.

M-Ezzat

@aperomsik
Copy link
Member

Isn't that the compiler's job?

@m-ezzat
Copy link
Author

m-ezzat commented Mar 13, 2016

As in the description "On the other hand, constants can be referenced from many places, but only need to be updated in a single place."

private static final int DATABASE_VERSION = 4;
private static String TAG = "DBHelper";
Context myCtx;

private static final String DBVERSION_CREATE =
"create table " + TABLE_DBVERSION + " ("
CREATE_TABLE + TABLE_DBVERSION + " ("
Copy link
Member

Choose a reason for hiding this comment

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

Could you revert these changes for sql string building.They should be as plain text as possible or using a Builder. I am for plain text.

@m-ezzat
Copy link
Author

m-ezzat commented Mar 14, 2016

@friedger Ok

@m-ezzat
Copy link
Author

m-ezzat commented Jun 28, 2016

Sorry, again here, I am not sure whether you do not agree with these changes or not. Please close this PR and the others in this project if not. Thanks!

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