diff options
author | Julien Lancelot <julien.lancelot@sonarsource.com> | 2019-12-04 13:04:53 +0100 |
---|---|---|
committer | SonarTech <sonartech@sonarsource.com> | 2019-12-05 20:46:09 +0100 |
commit | 3df94592f1f3b72efadab2f0f68737d7e3a4ba1a (patch) | |
tree | a38d35264bf1bb5b0905345c2d53a254ed555567 /sonar-application/src/main/java/org | |
parent | 86b588f7038e02445b19dc0fb087a09985ee4428 (diff) | |
download | sonarqube-3df94592f1f3b72efadab2f0f68737d7e3a4ba1a.tar.gz sonarqube-3df94592f1f3b72efadab2f0f68737d7e3a4ba1a.zip |
SONAR-12770 Do not let people think that a Java version > 11 is officially supported
Diffstat (limited to 'sonar-application/src/main/java/org')
-rw-r--r-- | sonar-application/src/main/java/org/sonar/application/App.java | 6 |
1 files changed, 2 insertions, 4 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 c37aff811d4..92f8881abbd 100644 --- a/sonar-application/src/main/java/org/sonar/application/App.java +++ b/sonar-application/src/main/java/org/sonar/application/App.java @@ -32,6 +32,7 @@ import org.sonar.core.extension.ServiceLoaderWrapper; import org.sonar.process.System2; import org.sonar.process.SystemExit; +import static com.google.common.base.Preconditions.checkState; import static org.sonar.application.config.SonarQubeVersionHelper.getSonarqubeVersion; import static org.sonar.process.ProcessProperties.Property.CLUSTER_NAME; @@ -88,10 +89,7 @@ public class App { if (MetadataLoader.loadEdition(org.sonar.api.utils.System2.INSTANCE) == SonarEdition.SONARCLOUD) { return; } - - if (!javaVersion.isAtLeastJava11()) { - throw new IllegalStateException("SonarQube requires Java 11+ to run"); - } + checkState(javaVersion.isAtLeastJava11(), "SonarQube requires Java 11 to run"); } public static void main(String[] args) throws Exception { |