From: Julien HENRY Date: Thu, 11 Jul 2013 16:25:09 +0000 (+0200) Subject: Fix some quality flaws X-Git-Tag: 3.7~146 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=6335b59fcfed11479e64ecc57a5109500432a4e9;p=sonarqube.git Fix some quality flaws --- diff --git a/sonar-batch/src/main/java/org/sonar/batch/bootstrap/ServerClient.java b/sonar-batch/src/main/java/org/sonar/batch/bootstrap/ServerClient.java index b04bd67a360..39edd95d0f1 100644 --- a/sonar-batch/src/main/java/org/sonar/batch/bootstrap/ServerClient.java +++ b/sonar-batch/src/main/java/org/sonar/batch/bootstrap/ServerClient.java @@ -32,6 +32,8 @@ import org.sonar.api.utils.HttpDownloader; import org.sonar.api.utils.SonarException; import org.sonar.batch.bootstrapper.EnvironmentInformation; +import javax.annotation.Nullable; + import java.io.File; import java.io.IOException; import java.io.InputStream; @@ -61,7 +63,7 @@ public class ServerClient implements BatchComponent { download(pathStartingWithSlash, toFile, null); } - public void download(String pathStartingWithSlash, File toFile, Integer readTimeoutMillis) { + public void download(String pathStartingWithSlash, File toFile, @Nullable Integer readTimeoutMillis) { try { InputSupplier inputSupplier = doRequest(pathStartingWithSlash, readTimeoutMillis); Files.copy(inputSupplier, toFile); @@ -91,7 +93,7 @@ public class ServerClient implements BatchComponent { } } - private InputSupplier doRequest(String pathStartingWithSlash, Integer timeoutMillis) { + private InputSupplier doRequest(String pathStartingWithSlash, @Nullable Integer timeoutMillis) { Preconditions.checkArgument(pathStartingWithSlash.startsWith("/"), "Path must start with slash /"); String path = StringEscapeUtils.escapeHtml(pathStartingWithSlash);