Skip to content

Commit 13cbd57

Browse files
SCANNERAPI-185 - Fixed code smell
1 parent 63429ae commit 13cbd57

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

api/src/main/java/org/sonarsource/scanner/api/internal/ServerConnection.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
import java.nio.file.Files;
2525
import java.nio.file.Path;
2626
import java.nio.file.StandardCopyOption;
27+
import java.util.Locale;
2728
import java.util.Map;
2829
import okhttp3.OkHttpClient;
2930
import okhttp3.Request;
@@ -116,7 +117,7 @@ private ResponseBody callUrl(String url) throws IOException {
116117
}
117118
return response.body();
118119
} catch (Exception e) {
119-
logger.error(format("%s server [%s] can not be reached", url.toLowerCase().contains("sonarcloud") ? "SonarCloud" : "SonarQube", baseUrlWithoutTrailingSlash));
120+
logger.error(format("%s server [%s] can not be reached", url.toLowerCase(Locale.getDefault()).contains("sonarcloud") ? "SonarCloud" : "SonarQube", baseUrlWithoutTrailingSlash));
120121
throw e;
121122
}
122123
}

0 commit comments

Comments
 (0)