diff options
author | Duarte Meneses <duarte.meneses@sonarsource.com> | 2017-05-04 10:42:41 +0200 |
---|---|---|
committer | dbmeneses <duarte.meneses@sonarsource.com> | 2017-05-05 12:44:12 +0100 |
commit | b49a85f235cc2e68c6c8bb31dcb5d063e40cd6b0 (patch) | |
tree | d52b6c89f6d0a4d86a52aca1d33d6b6e98664ef6 /sonar-scanner-engine | |
parent | 6945920d11f626a76f02fa4004521fc3a962de1b (diff) | |
download | sonarqube-b49a85f235cc2e68c6c8bb31dcb5d063e40cd6b0.tar.gz sonarqube-b49a85f235cc2e68c6c8bb31dcb5d063e40cd6b0.zip |
Fix quality issues
Diffstat (limited to 'sonar-scanner-engine')
-rw-r--r-- | sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/filesystem/CharsetValidation.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/filesystem/CharsetValidation.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/filesystem/CharsetValidation.java index 8dd8f44240d..5125a801a4e 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/filesystem/CharsetValidation.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/filesystem/CharsetValidation.java @@ -31,8 +31,8 @@ import javax.annotation.Nullable; public class CharsetValidation { - private static final float UTF_16_NULL_PASS_THRESHOLD = 0.7f; - private static final float UTF_16_NULL_FAIL_THRESHOLD = 0.1f; + private static final double UTF_16_NULL_PASS_THRESHOLD = 0.7; + private static final double UTF_16_NULL_FAIL_THRESHOLD = 0.1; /** * Checks if an array of bytes looks UTF-16 encoded. @@ -81,8 +81,8 @@ public class CharsetValidation { } } - float beAsciiPerc = beAscii * 2.0f / (float) buffer.length; - float leAsciiPerc = leAscii * 2.0f / (float) buffer.length; + double beAsciiPerc = beAscii * 2.0 / (double) buffer.length; + double leAsciiPerc = leAscii * 2.0 / (double) buffer.length; if (leLines == 0) { // could be BE |