diff options
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"); } |