]> source.dussan.org Git - sonarqube.git/commitdiff
Fix some quality flaws
authorJulien HENRY <julien.henry@sonarsource.com>
Thu, 11 Jul 2013 16:25:09 +0000 (18:25 +0200)
committerJulien HENRY <julien.henry@sonarsource.com>
Thu, 11 Jul 2013 16:27:13 +0000 (18:27 +0200)
sonar-batch/src/main/java/org/sonar/batch/bootstrap/ServerClient.java

index b04bd67a360765619515f64b8bd93599ec7e464c..39edd95d0f1a84e59a1962de6c2e559e388fb1dd 100644 (file)
@@ -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<InputStream> inputSupplier = doRequest(pathStartingWithSlash, readTimeoutMillis);
       Files.copy(inputSupplier, toFile);
@@ -91,7 +93,7 @@ public class ServerClient implements BatchComponent {
     }
   }
 
-  private InputSupplier<InputStream> doRequest(String pathStartingWithSlash, Integer timeoutMillis) {
+  private InputSupplier<InputStream> doRequest(String pathStartingWithSlash, @Nullable Integer timeoutMillis) {
     Preconditions.checkArgument(pathStartingWithSlash.startsWith("/"), "Path must start with slash /");
     String path = StringEscapeUtils.escapeHtml(pathStartingWithSlash);