diff options
author | Julien HENRY <henryju@yahoo.fr> | 2017-10-03 16:39:32 +0200 |
---|---|---|
committer | Julien HENRY <julien.henry@sonarsource.com> | 2017-10-04 13:48:58 +0200 |
commit | b811d8eaa4bce4d6bdd5ec7164ecb4ad5fa979c8 (patch) | |
tree | 2075cdac22a16ad025a559968d9827167215a6cc /sonar-scanner-engine | |
parent | a29869daf79c201e7c88ee9476bf94dbdca1a125 (diff) | |
download | sonarqube-b811d8eaa4bce4d6bdd5ec7164ecb4ad5fa979c8.tar.gz sonarqube-b811d8eaa4bce4d6bdd5ec7164ecb4ad5fa979c8.zip |
SONAR-9770 Stop listing deprecated modes
Diffstat (limited to 'sonar-scanner-engine')
2 files changed, 2 insertions, 22 deletions
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/GlobalAnalysisMode.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/GlobalAnalysisMode.java index 3da37eedc63..dd4873435e6 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/GlobalAnalysisMode.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/GlobalAnalysisMode.java @@ -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 + "."); } } diff --git a/sonar-scanner-engine/src/test/java/org/sonar/scanner/bootstrap/GlobalAnalysisModeTest.java b/sonar-scanner-engine/src/test/java/org/sonar/scanner/bootstrap/GlobalAnalysisModeTest.java index 0581e431f88..faec85f05ea 100644 --- a/sonar-scanner-engine/src/test/java/org/sonar/scanner/bootstrap/GlobalAnalysisModeTest.java +++ b/sonar-scanner-engine/src/test/java/org/sonar/scanner/bootstrap/GlobalAnalysisModeTest.java @@ -33,25 +33,9 @@ public class GlobalAnalysisModeTest { 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"); } |