aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-application/src/main/java/org/sonar/application/App.java
diff options
context:
space:
mode:
authorDuarte Meneses <duarte.meneses@sonarsource.com>2019-05-15 14:30:09 -0500
committersonartech <sonartech@sonarsource.com>2019-06-28 08:45:40 +0200
commit374b0be668439f51f7e07a1c155dcbf79d1a8d33 (patch)
treebcd590220500588cb6f0cc34c8b3f70dfaf8801d /sonar-application/src/main/java/org/sonar/application/App.java
parentb9dc94e84a4d1cb2f553125271352fa118ca06c5 (diff)
downloadsonarqube-374b0be668439f51f7e07a1c155dcbf79d1a8d33.tar.gz
sonarqube-374b0be668439f51f7e07a1c155dcbf79d1a8d33.zip
SONAR-12002 Fail startup if JRE < 11
Diffstat (limited to 'sonar-application/src/main/java/org/sonar/application/App.java')
-rw-r--r--sonar-application/src/main/java/org/sonar/application/App.java5
1 files changed, 2 insertions, 3 deletions
diff --git a/sonar-application/src/main/java/org/sonar/application/App.java b/sonar-application/src/main/java/org/sonar/application/App.java
index 9133001ecda..f9e7fe288fc 100644
--- a/sonar-application/src/main/java/org/sonar/application/App.java
+++ b/sonar-application/src/main/java/org/sonar/application/App.java
@@ -20,7 +20,6 @@
package org.sonar.application;
import java.io.IOException;
-import org.slf4j.LoggerFactory;
import org.sonar.api.SonarEdition;
import org.sonar.api.internal.MetadataLoader;
import org.sonar.application.command.CommandFactory;
@@ -61,7 +60,7 @@ public class App {
appState.registerClusterName(settings.getProps().nonNullValue(CLUSTER_NAME.getKey()));
AppReloader appReloader = new AppReloaderImpl(settingsLoader, fileSystem, appState, logging);
fileSystem.reset();
- CommandFactory commandFactory = new CommandFactoryImpl(settings.getProps(), fileSystem.getTempDir(), System2.INSTANCE, JavaVersion.INSTANCE);
+ CommandFactory commandFactory = new CommandFactoryImpl(settings.getProps(), fileSystem.getTempDir(), System2.INSTANCE);
try (ProcessLauncher processLauncher = new ProcessLauncherImpl(fileSystem.getTempDir())) {
Scheduler scheduler = new SchedulerImpl(settings, appReloader, commandFactory, processLauncher, appState);
@@ -91,7 +90,7 @@ public class App {
}
if (!javaVersion.isAtLeastJava11()) {
- LoggerFactory.getLogger(this.getClass()).warn("SonarQube will require Java 11+ starting on next version");
+ throw new IllegalStateException("SonarQube requires Java 11+ to run");
}
}