aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-plugin-api/src/main/java/org/sonar/api/internal/ApiVersion.java
diff options
context:
space:
mode:
authorDuarte Meneses <duarte.meneses@sonarsource.com>2019-04-30 10:52:55 -0500
committersonartech <sonartech@sonarsource.com>2019-05-06 11:01:03 +0200
commita517a4c1b6afe3c3c202801249dcbea41cfdec4c (patch)
treeb3ffb242da45497fb6f3583123f1f7b58d7eb46c /sonar-plugin-api/src/main/java/org/sonar/api/internal/ApiVersion.java
parent140aa8271a5af00a84154698b18dc254d5f7bae9 (diff)
downloadsonarqube-a517a4c1b6afe3c3c202801249dcbea41cfdec4c.tar.gz
sonarqube-a517a4c1b6afe3c3c202801249dcbea41cfdec4c.zip
SONAR-11969 Make Edition available for analyzers in the Scanner API
Diffstat (limited to 'sonar-plugin-api/src/main/java/org/sonar/api/internal/ApiVersion.java')
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/internal/ApiVersion.java51
1 files changed, 0 insertions, 51 deletions
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/internal/ApiVersion.java b/sonar-plugin-api/src/main/java/org/sonar/api/internal/ApiVersion.java
deleted file mode 100644
index 5b68a5d7aa4..00000000000
--- a/sonar-plugin-api/src/main/java/org/sonar/api/internal/ApiVersion.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * SonarQube
- * Copyright (C) 2009-2019 SonarSource SA
- * mailto:info AT sonarsource DOT com
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 3 of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-package org.sonar.api.internal;
-
-import com.google.common.io.Resources;
-import java.io.IOException;
-import java.net.URL;
-import java.nio.charset.StandardCharsets;
-import org.sonar.api.utils.System2;
-import org.sonar.api.utils.Version;
-
-/**
- * For internal use
- *
- * @since 6.0
- */
-public class ApiVersion {
-
- private static final String FILE_PATH = "/sonar-api-version.txt";
-
- private ApiVersion() {
- // only static methods
- }
-
- public static Version load(System2 system) {
- try {
- URL url = system.getResource(FILE_PATH);
- String versionInFile = Resources.toString(url, StandardCharsets.UTF_8);
- return Version.parse(versionInFile);
- } catch (IOException e) {
- throw new IllegalStateException("Can not load " + FILE_PATH + " from classpath", e);
- }
- }
-}