aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-webserver-core/src
diff options
context:
space:
mode:
authorJacek <jacek.poreda@sonarsource.com>2022-05-30 18:50:42 +0200
committersonartech <sonartech@sonarsource.com>2022-05-31 20:02:50 +0000
commit9097b10693f9c4fe2c7bde4bccdbca151ebfa452 (patch)
tree10eb71dfd890e5725f4f085386812eeb65c53197 /server/sonar-webserver-core/src
parentcdeca9bf6ccd0cb1a3b2d397efa8ace1ef4789c2 (diff)
downloadsonarqube-9097b10693f9c4fe2c7bde4bccdbca151ebfa452.tar.gz
sonarqube-9097b10693f9c4fe2c7bde4bccdbca151ebfa452.zip
SONAR-16232 Use plugin api version for SonarRuntime impl
- introduce internal SonarQubeVersion
Diffstat (limited to 'server/sonar-webserver-core/src')
-rw-r--r--server/sonar-webserver-core/src/main/java/org/sonar/server/platform/LogServerVersion.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/server/sonar-webserver-core/src/main/java/org/sonar/server/platform/LogServerVersion.java b/server/sonar-webserver-core/src/main/java/org/sonar/server/platform/LogServerVersion.java
index c9228750aab..abf95fbb6f9 100644
--- a/server/sonar-webserver-core/src/main/java/org/sonar/server/platform/LogServerVersion.java
+++ b/server/sonar-webserver-core/src/main/java/org/sonar/server/platform/LogServerVersion.java
@@ -23,27 +23,27 @@ import com.google.common.base.Joiner;
import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;
-import org.sonar.api.SonarRuntime;
import org.sonar.api.Startable;
import org.sonar.api.server.ServerSide;
import org.sonar.api.utils.Version;
import org.sonar.api.utils.log.Logger;
import org.sonar.api.utils.log.Loggers;
+import org.sonar.core.platform.SonarQubeVersion;
@ServerSide
public class LogServerVersion implements Startable {
private static final Logger LOG = Loggers.get(LogServerVersion.class);
- private final SonarRuntime runtime;
+ private final SonarQubeVersion sonarQubeVersion;
- public LogServerVersion(SonarRuntime runtime) {
- this.runtime = runtime;
+ public LogServerVersion(SonarQubeVersion sonarQubeVersion) {
+ this.sonarQubeVersion = sonarQubeVersion;
}
@Override
public void start() {
String scmRevision = read("/build.properties").getProperty("Implementation-Build");
- Version version = runtime.getApiVersion();
+ Version version = sonarQubeVersion.get();
LOG.info("SonarQube {}", Joiner.on(" / ").skipNulls().join("Server", version, scmRevision));
}