]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-9770 Stop listing deprecated modes
authorJulien HENRY <henryju@yahoo.fr>
Tue, 3 Oct 2017 14:39:32 +0000 (16:39 +0200)
committerJulien HENRY <julien.henry@sonarsource.com>
Wed, 4 Oct 2017 11:48:58 +0000 (13:48 +0200)
sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/GlobalAnalysisMode.java
sonar-scanner-engine/src/test/java/org/sonar/scanner/bootstrap/GlobalAnalysisModeTest.java

index 3da37eedc63e0396bc11a38eabc380c40e0088c3..dd4873435e6eaecd2af67f4147a611b8f11467e2 100644 (file)
@@ -76,12 +76,8 @@ public class GlobalAnalysisMode {
       return;
     }
 
-    if (CoreProperties.ANALYSIS_MODE_INCREMENTAL.equals(mode)) {
-      throw new IllegalStateException("Invalid analysis mode: " + mode + ". This mode was removed in SonarQube 5.2. Valid modes are: " + Arrays.toString(VALID_MODES));
-    }
-
     if (!Arrays.asList(VALID_MODES).contains(mode)) {
-      throw new IllegalStateException("Invalid analysis mode: " + mode + ". Valid modes are: " + Arrays.toString(VALID_MODES));
+      throw new IllegalStateException("Invalid analysis mode: " + mode + ".");
     }
 
   }
index 0581e431f883d56f98e243a0b7eb102859bd1a5e..faec85f05ea363f55ed9d6366086d7eaacad7f28 100644 (file)
@@ -32,26 +32,10 @@ public class GlobalAnalysisModeTest {
   @Rule
   public ExpectedException thrown = ExpectedException.none();
 
-  @Test
-  public void testModeNotSupported() {
-    thrown.expect(IllegalStateException.class);
-    thrown.expectMessage("[preview, publish, issues]");
-
-    createMode(CoreProperties.ANALYSIS_MODE, "invalid");
-  }
-
-  @Test
-  public void incremental_mode_no_longer_valid() {
-    thrown.expect(IllegalStateException.class);
-    thrown.expectMessage("This mode was removed in SonarQube 5.2");
-
-    createMode(CoreProperties.ANALYSIS_MODE, CoreProperties.ANALYSIS_MODE_INCREMENTAL);
-  }
-
   @Test
   public void invalidate_mode() {
     thrown.expect(IllegalStateException.class);
-    thrown.expectMessage("[preview, publish, issues]");
+    thrown.expectMessage("Invalid analysis mode: invalid.");
 
     createMode(CoreProperties.ANALYSIS_MODE, "invalid");
   }