diff options
author | Julien HENRY <julien.henry@sonarsource.com> | 2013-07-11 18:25:09 +0200 |
---|---|---|
committer | Julien HENRY <julien.henry@sonarsource.com> | 2013-07-11 18:27:13 +0200 |
commit | 6335b59fcfed11479e64ecc57a5109500432a4e9 (patch) | |
tree | c9d7bea6844819490cbc829371580dcf339bae33 | |
parent | 13530c23de4bebe0f67164c9fabab7a900e2ba39 (diff) | |
download | sonarqube-6335b59fcfed11479e64ecc57a5109500432a4e9.tar.gz sonarqube-6335b59fcfed11479e64ecc57a5109500432a4e9.zip |
Fix some quality flaws
-rw-r--r-- | sonar-batch/src/main/java/org/sonar/batch/bootstrap/ServerClient.java | 6 |
1 files changed, 4 insertions, 2 deletions
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<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); |