diff options
author | Simon Brandhof <simon.brandhof@gmail.com> | 2012-07-15 21:54:49 +0200 |
---|---|---|
committer | Simon Brandhof <simon.brandhof@gmail.com> | 2012-07-15 21:54:49 +0200 |
commit | 9f6f69e368d06a0ae064ad9fd6fded06307d0c99 (patch) | |
tree | a2093084eea754abce330c7c706c229d8d85af13 /sonar-plugin-api | |
parent | 3304cf145f064766b10f9e657d8b82f3e6f25465 (diff) | |
download | sonarqube-9f6f69e368d06a0ae064ad9fd6fded06307d0c99.tar.gz sonarqube-9f6f69e368d06a0ae064ad9fd6fded06307d0c99.zip |
Fix some quality flaws
Diffstat (limited to 'sonar-plugin-api')
3 files changed, 8 insertions, 12 deletions
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/database/DatabaseProperties.java b/sonar-plugin-api/src/main/java/org/sonar/api/database/DatabaseProperties.java index 1c9df357485..20da95de1c1 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/database/DatabaseProperties.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/database/DatabaseProperties.java @@ -24,9 +24,7 @@ public interface DatabaseProperties { int MAX_TEXT_SIZE = 16777215; String PROP_URL = "sonar.jdbc.url"; - String PROP_URL_DEFAULT_VALUE = "jdbc:h2:tcp://localhost/sonar"; String PROP_DRIVER = "sonar.jdbc.driverClassName"; - String PROP_DRIVER_DEFAULT_VALUE = "org.h2.Driver"; String PROP_DRIVER_DEPRECATED = "sonar.jdbc.driver"; String PROP_USER = "sonar.jdbc.username"; String PROP_USER_DEPRECATED = "sonar.jdbc.user"; diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/platform/NewUserHandler.java b/sonar-plugin-api/src/main/java/org/sonar/api/platform/NewUserHandler.java index 3e65e571a98..833c68d7dea 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/platform/NewUserHandler.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/platform/NewUserHandler.java @@ -58,7 +58,7 @@ public interface NewUserHandler extends ServerExtension { return new Builder(); } - public static class Builder { + public static final class Builder { private String login; private String name; private String email; diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/design/DependencyTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/design/DependencyTest.java index f9fd0e10d33..0faaff16ecd 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/design/DependencyTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/design/DependencyTest.java @@ -21,9 +21,7 @@ package org.sonar.api.design; import org.junit.Test; -import static junit.framework.Assert.assertTrue; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; +import static org.fest.assertions.Assertions.assertThat; public class DependencyTest { @@ -33,13 +31,13 @@ public class DependencyTest { DependencyDto dep1Clone = new DependencyDto().setFromSnapshotId(10).setToSnapshotId(30); DependencyDto dep2 = new DependencyDto().setFromSnapshotId(10).setToSnapshotId(31); - assertFalse(dep1.equals(dep2)); - assertTrue(dep1.equals(dep1)); - assertTrue(dep1.equals(dep1Clone)); + assertThat(dep1.equals(dep2)).isFalse(); + assertThat(dep1.equals(dep1)).isTrue(); + assertThat(dep1.equals(dep1Clone)).isTrue(); - assertEquals(dep1.hashCode(), dep1.hashCode()); - assertEquals(dep1.hashCode(), dep1Clone.hashCode()); - assertEquals(dep1.toString(), dep1.toString()); + assertThat(dep1.hashCode()).isEqualTo(dep1.hashCode()); + assertThat(dep1.hashCode()).isEqualTo(dep1Clone.hashCode()); + assertThat(dep1.toString()).isEqualTo(dep1.toString()); } @Test(expected = IllegalArgumentException.class) |