aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-application/src
diff options
context:
space:
mode:
authorDavid Gageot <david@gageot.net>2015-05-07 19:04:22 +0200
committerDavid Gageot <david@gageot.net>2015-05-07 19:12:29 +0200
commit5a587fb74fd9a8c8839b6f8582f5ff15f5183805 (patch)
treeb0201ec0afc1dad985a53c06c703a429d4bf095b /sonar-application/src
parent18834f5bf7f0bdd34912c46a83caaaac70db1e87 (diff)
downloadsonarqube-5a587fb74fd9a8c8839b6f8582f5ff15f5183805.tar.gz
sonarqube-5a587fb74fd9a8c8839b6f8582f5ff15f5183805.zip
Redundant throws clause in tests
Diffstat (limited to 'sonar-application/src')
-rw-r--r--sonar-application/src/test/java/org/sonar/application/AppLoggingTest.java6
-rw-r--r--sonar-application/src/test/java/org/sonar/application/CommandLineParserTest.java4
-rw-r--r--sonar-application/src/test/java/org/sonar/application/JdbcSettingsTest.java4
3 files changed, 7 insertions, 7 deletions
diff --git a/sonar-application/src/test/java/org/sonar/application/AppLoggingTest.java b/sonar-application/src/test/java/org/sonar/application/AppLoggingTest.java
index fc187f3e4a4..4bc159a7af0 100644
--- a/sonar-application/src/test/java/org/sonar/application/AppLoggingTest.java
+++ b/sonar-application/src/test/java/org/sonar/application/AppLoggingTest.java
@@ -59,7 +59,7 @@ public class AppLoggingTest {
}
@Test
- public void configure_defaults() throws Exception {
+ public void configure_defaults() {
LoggerContext ctx = sut.configure(props);
Logger gobbler = ctx.getLogger(AppLogging.GOBBLER_LOGGER);
@@ -72,7 +72,7 @@ public class AppLoggingTest {
}
@Test
- public void configure_no_rotation() throws Exception {
+ public void configure_no_rotation() {
props.set("sonar.log.rollingPolicy", "none");
LoggerContext ctx = sut.configure(props);
@@ -83,7 +83,7 @@ public class AppLoggingTest {
}
@Test
- public void copyGobblerToConsole() throws Exception {
+ public void copyGobblerToConsole() {
props.set("sonar.log.console", "true");
LoggerContext ctx = sut.configure(props);
diff --git a/sonar-application/src/test/java/org/sonar/application/CommandLineParserTest.java b/sonar-application/src/test/java/org/sonar/application/CommandLineParserTest.java
index fa57d8d353d..e2320b7eeda 100644
--- a/sonar-application/src/test/java/org/sonar/application/CommandLineParserTest.java
+++ b/sonar-application/src/test/java/org/sonar/application/CommandLineParserTest.java
@@ -31,7 +31,7 @@ public class CommandLineParserTest {
CommandLineParser parser = new CommandLineParser();
@Test
- public void parseArguments() throws Exception {
+ public void parseArguments() {
System.setProperty("CommandLineParserTest.unused", "unused");
System.setProperty("sonar.CommandLineParserTest.used", "used");
@@ -46,7 +46,7 @@ public class CommandLineParserTest {
}
@Test
- public void argumentsToProperties() throws Exception {
+ public void argumentsToProperties() {
Properties p = parser.argumentsToProperties(new String[] {"-Dsonar.foo=bar", "-Dsonar.whitespace=foo bar"});
assertThat(p).hasSize(2);
assertThat(p.getProperty("sonar.foo")).isEqualTo("bar");
diff --git a/sonar-application/src/test/java/org/sonar/application/JdbcSettingsTest.java b/sonar-application/src/test/java/org/sonar/application/JdbcSettingsTest.java
index d6d575bfad1..9e809a2aeab 100644
--- a/sonar-application/src/test/java/org/sonar/application/JdbcSettingsTest.java
+++ b/sonar-application/src/test/java/org/sonar/application/JdbcSettingsTest.java
@@ -41,7 +41,7 @@ public class JdbcSettingsTest {
JdbcSettings settings = new JdbcSettings();
@Test
- public void driver_provider() throws Exception {
+ public void driver_provider() {
assertThat(settings.driverProvider("jdbc:oracle:thin:@localhost/XE")).isEqualTo(JdbcSettings.Provider.ORACLE);
assertThat(settings.driverProvider("jdbc:mysql://localhost:3306/sonar?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true&useConfigs=maxPerformance"))
.isEqualTo(JdbcSettings.Provider.MYSQL);
@@ -60,7 +60,7 @@ public class JdbcSettingsTest {
}
@Test
- public void check_mysql_parameters() throws Exception {
+ public void check_mysql_parameters() {
// minimal -> ok
settings.checkUrlParameters(JdbcSettings.Provider.MYSQL,
"jdbc:mysql://localhost:3306/sonar?useUnicode=true&characterEncoding=utf8");