diff options
author | Simon Brandhof <simon.brandhof@sonarsource.com> | 2017-01-05 17:59:05 +0100 |
---|---|---|
committer | Simon Brandhof <simon.brandhof@sonarsource.com> | 2017-01-11 11:20:36 +0100 |
commit | e1eaa719e95a20438dda7516797d155db1c3b56c (patch) | |
tree | cb9935064763eb6b05aaad6fde3ac3a9d417afb7 /sonar-scanner-engine | |
parent | f3020783d4aecd24160171f13c3cfa93bb46fe93 (diff) | |
download | sonarqube-e1eaa719e95a20438dda7516797d155db1c3b56c.tar.gz sonarqube-e1eaa719e95a20438dda7516797d155db1c3b56c.zip |
SONAR-8458 add SonarQube buildNumber to plugin API
Diffstat (limited to 'sonar-scanner-engine')
-rw-r--r-- | sonar-scanner-engine/src/main/java/org/sonar/scanner/util/BatchUtils.java | 27 |
1 files changed, 1 insertions, 26 deletions
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/util/BatchUtils.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/util/BatchUtils.java index 527e889fd62..40813b9a028 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/util/BatchUtils.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/util/BatchUtils.java @@ -20,24 +20,14 @@ package org.sonar.scanner.util; import com.google.common.base.Strings; -import java.io.BufferedReader; -import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; import java.io.UnsupportedEncodingException; import java.net.URLEncoder; -import java.nio.charset.StandardCharsets; -import javax.annotation.CheckForNull; import javax.annotation.Nullable; -import org.apache.commons.io.IOUtils; import org.apache.commons.lang.StringUtils; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; public class BatchUtils { - private static final Logger LOG = LoggerFactory.getLogger(BatchUtils.class); - private BatchUtils() { + // prevent instantiation } /** @@ -72,19 +62,4 @@ public class BatchUtils { return o.getClass().getName(); } - - @CheckForNull - public static String getServerVersion() { - InputStream is = BatchUtils.class.getResourceAsStream("/sq-version.txt"); - if (is == null) { - LOG.warn("Failed to get SQ version"); - return null; - } - try (BufferedReader br = IOUtils.toBufferedReader(new InputStreamReader(is, StandardCharsets.UTF_8))) { - return br.readLine(); - } catch (IOException e) { - LOG.warn("Failed to get SQ version", e); - return null; - } - } } |