]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-12770 Do not let people think that a Java version > 11 is officially supported
authorJulien Lancelot <julien.lancelot@sonarsource.com>
Wed, 4 Dec 2019 12:04:53 +0000 (13:04 +0100)
committerSonarTech <sonartech@sonarsource.com>
Thu, 5 Dec 2019 19:53:09 +0000 (20:53 +0100)
sonar-application/src/main/java/org/sonar/application/App.java
sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/GlobalContainer.java

index c37aff811d4a245f511b8265df21d34656dae562..92f8881abbd5aa0c4e44ed2d51fd75d82dc03258 100644 (file)
@@ -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 {
index 87f69aad2a849ce9182ea0c934724ad5c12b612e..8be6fb7cef72f1527d93f0293fcd42936a659b31 100644 (file)
@@ -83,7 +83,7 @@ public class GlobalContainer extends ComponentContainer {
     try {
       String.class.getMethod("isBlank");
     } catch (NoSuchMethodException e) {
-      LOG.warn("SonarScanner will require Java 11+ to run starting in SonarQube 8.x");
+      LOG.warn("SonarScanner will require Java 11 to run starting in SonarQube 8.x");
     }
   }