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

Multiple code improvements - squid:S1192, squid:S1166, squid:S1172, squid:S1213, squid:S1155, squid:UselessImportCheck #402

Merged
merged 1 commit into from
Jun 21, 2016
Merged

Conversation

georgekankava
Copy link

This pull request is focused on resolving occurrences of Sonar rules
squid:S1192 - String literals should not be duplicated.
squid:S1166 - Exception handlers should preserve the original exception.
squid:S1172 - Unused method parameters should be removed.
squid:S1213 - The members of an interface declaration or class should appear in a pre-defined order.
squid:S1155 - Collection.isEmpty() should be used to test for emptiness.
squid:UselessImportCheck - Useless imports should be removed.
This pull request removes 42 minutes of technical debt.
You can find more information about the issue here:
https://dev.eclipse.org/sonar/rules/show/squid:S1192
https://dev.eclipse.org/sonar/rules/show/squid:S1166
https://dev.eclipse.org/sonar/rules/show/squid:S1172
https://dev.eclipse.org/sonar/rules/show/squid:S1213
https://dev.eclipse.org/sonar/rules/show/squid:S1155
https://dev.eclipse.org/sonar/rules/show/squid:UselessImportCheck
Please let me know if you have any questions.
George Kankava



/**
* Identifies and stores version information of minio-java package at run time.
*/
enum MinioProperties {
INSTANCE;

private static final Logger LOGGER = Logger.getLogger(HeaderParser.class.getName());

Copy link
Member

Choose a reason for hiding this comment

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

@harshavardhana please check whether its ok.

@balamurugana
Copy link
Member

You would need to fix appveyor/travis-ci builds

@@ -16,19 +16,26 @@

package io.minio;

import io.minio.http.HeaderParser;
Copy link
Member

Choose a reason for hiding this comment

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

I see HeaderParser is not used here. Is this import needed?

@balamurugana
Copy link
Member

@georgekankava please rebase this pull request.

@georgekankava
Copy link
Author

@balamurugana sorry for the delay. I have rebased the PR.

@balamurugana
Copy link
Member

balamurugana commented Jun 20, 2016

LGTM. Please fix below stylecheck error from gradle build

:checkstyleMain[ant:checkstyle] /home/bala/java/src/github.com/minio-java/src/main/java/io/minio/Digest.java:35: First sentence should be present.
[ant:checkstyle] /home/bala/java/src/github.com/minio-java/src/main/java/io/minio/Digest.java:186: First sentence should be present.
[ant:checkstyle] /home/bala/java/src/github.com/minio-java/src/main/java/io/minio/Digest.java:189: At-clause should have a non-empty description.
[ant:checkstyle] /home/bala/java/src/github.com/minio-java/src/main/java/io/minio/Digest.java:190: At-clause should have a non-empty description.
[ant:checkstyle] /home/bala/java/src/github.com/minio-java/src/main/java/io/minio/Digest.java:191: At-clause should have a non-empty description.
[ant:checkstyle] /home/bala/java/src/github.com/minio-java/src/main/java/io/minio/Digest.java:192: At-clause should have a non-empty description.
[ant:checkstyle] /home/bala/java/src/github.com/minio-java/src/main/java/io/minio/Digest.java:193: At-clause should have a non-empty description.
[ant:checkstyle] /home/bala/java/src/github.com/minio-java/src/main/java/io/minio/Digest.java:194: At-clause should have a non-empty description.
[ant:checkstyle] /home/bala/java/src/github.com/minio-java/src/main/java/io/minio/Digest.java:195: At-clause should have a non-empty description.
[ant:checkstyle] /home/bala/java/src/github.com/minio-java/src/main/java/io/minio/Digest.java:196: At-clause should have a non-empty description.
[ant:checkstyle] /home/bala/java/src/github.com/minio-java/src/main/java/io/minio/Digest.java:197: At-clause should have a non-empty description.
[ant:checkstyle] /home/bala/java/src/github.com/minio-java/src/main/java/io/minio/Digest.java:236:9: WhitespaceAround: 'if' is not followed by whitespace.
[ant:checkstyle] /home/bala/java/src/github.com/minio-java/src/main/java/io/minio/Digest.java:239:9: WhitespaceAround: 'if' is not followed by whitespace.

@georgekankava
Copy link
Author

georgekankava commented Jun 21, 2016

@balamurugana I am about to fix the checkstyle errors.

…quid:S1213, squid:S1155, squid:UselessImportCheck
@georgekankava
Copy link
Author

@balamurugana updated.

@abperiasamy
Copy link
Member

LGTM

@harshavardhana harshavardhana merged commit 9aa98d5 into minio:master Jun 21, 2016
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.

4 participants