]> source.dussan.org Git - sonarqube.git/commitdiff
Fix some quality flaws
authorSimon Brandhof <simon.brandhof@gmail.com>
Wed, 12 Mar 2014 09:40:57 +0000 (10:40 +0100)
committerSimon Brandhof <simon.brandhof@gmail.com>
Wed, 12 Mar 2014 09:40:57 +0000 (10:40 +0100)
sonar-server/src/main/java/org/sonar/server/db/migrations/v36/Referentials.java
sonar-server/src/main/java/org/sonar/server/db/migrations/v42/PackageKeysMigration.java

index b106deb7a583bf62d472497da7948efca90f7a93..f3bf398b1f7e27e468a7656924c46d1ee7e0ed40 100644 (file)
@@ -107,7 +107,7 @@ class Referentials {
       stmt = connection.createStatement();
       stmt.setFetchSize(10000);
       rs = stmt.executeQuery("select id from rule_failures");
-      ConcurrentLinkedQueue<long[]> queue = new ConcurrentLinkedQueue<long[]>();
+      Queue<long[]> queue = new ConcurrentLinkedQueue<long[]>();
 
       totalViolations = 0;
       long[] block = new long[VIOLATION_GROUP_SIZE];
index fa5c973e8d43de2f77259f5a71282b1eb96628ad..9cdae43b84b3c4cc88950b1f5d6a4841e7543b32 100644 (file)
@@ -77,7 +77,7 @@ public class PackageKeysMigration implements DatabaseMigration {
   String convertKey(String packageKey) {
     String prefix = StringUtils.substringBeforeLast(packageKey, ":") + ":";
     String key = StringUtils.substringAfterLast(packageKey, ":");
-    if (key.equals("[default]")) {
+    if ("[default]".equals(key)) {
       return prefix + "[root]";
     }
     return prefix + StringUtils.replace(key, ".", "/");