]> source.dussan.org Git - sonarqube.git/commitdiff
Revert move of Period component since it is used by devcockpit
authorJulien HENRY <julien.henry@sonarsource.com>
Wed, 11 Feb 2015 14:31:53 +0000 (15:31 +0100)
committerJulien HENRY <julien.henry@sonarsource.com>
Wed, 11 Feb 2015 14:31:53 +0000 (15:31 +0100)
plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/issue/CountUnresolvedIssuesDecorator.java
plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/timemachine/AbstractNewCoverageFileAnalyzer.java
plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/issue/CountUnresolvedIssuesDecoratorTest.java
sonar-batch/src/main/java/org/sonar/batch/components/Period.java [new file with mode: 0644]
sonar-batch/src/main/java/org/sonar/batch/components/TimeMachineConfiguration.java
sonar-batch/src/main/java/org/sonar/batch/debt/NewDebtDecorator.java
sonar-batch/src/main/java/org/sonar/batch/deprecated/components/Period.java [deleted file]
sonar-batch/src/main/java/org/sonar/batch/scan/filesystem/FileIndexer.java
sonar-batch/src/test/java/org/sonar/batch/debt/NewDebtDecoratorTest.java

index 61a6b69cc74b12325ab040487b193544b93b6aa1..afe895137bf92cd262e1b2d2dc166079a90743c9 100644 (file)
@@ -19,9 +19,9 @@
  */
 package org.sonar.plugins.core.issue;
 
-import org.sonar.batch.components.TimeMachineConfiguration;
+import org.sonar.batch.components.Period;
 
-import org.sonar.batch.deprecated.components.Period;
+import org.sonar.batch.components.TimeMachineConfiguration;
 import com.google.common.annotations.VisibleForTesting;
 import com.google.common.collect.*;
 import org.apache.commons.lang.time.DateUtils;
index c275645899ef9e006de4d2db242b3b7c1753a3db..1ade50dfc61130aeb6f4be7340f8f52b268a0335 100644 (file)
@@ -19,9 +19,9 @@
  */
 package org.sonar.plugins.core.timemachine;
 
-import org.sonar.batch.components.TimeMachineConfiguration;
+import org.sonar.batch.components.Period;
 
-import org.sonar.batch.deprecated.components.Period;
+import org.sonar.batch.components.TimeMachineConfiguration;
 import org.sonar.api.batch.RequiresDB;
 import com.google.common.collect.Lists;
 import com.google.common.collect.Maps;
index 912779a5356070751fc746085c79e5b7c6f9f455..935ff4a873cc7d88534d0f1c954557aa5adc031a 100644 (file)
@@ -20,9 +20,9 @@
 
 package org.sonar.plugins.core.issue;
 
-import org.sonar.batch.components.TimeMachineConfiguration;
+import org.sonar.batch.components.Period;
 
-import org.sonar.batch.deprecated.components.Period;
+import org.sonar.batch.components.TimeMachineConfiguration;
 import com.google.common.collect.Lists;
 import org.apache.commons.lang.ObjectUtils;
 import org.apache.commons.lang.time.DateUtils;
diff --git a/sonar-batch/src/main/java/org/sonar/batch/components/Period.java b/sonar-batch/src/main/java/org/sonar/batch/components/Period.java
new file mode 100644 (file)
index 0000000..1b40539
--- /dev/null
@@ -0,0 +1,49 @@
+/*
+ * SonarQube, open source software quality management tool.
+ * Copyright (C) 2008-2014 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * SonarQube is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * SonarQube is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+
+package org.sonar.batch.components;
+
+import javax.annotation.CheckForNull;
+import javax.annotation.Nullable;
+
+import java.util.Date;
+
+/**
+ * Used by devcockpit
+ */
+public class Period {
+
+  private int index;
+  private Date date;
+
+  public Period(int index, @Nullable Date date) {
+    this.index = index;
+    this.date = date;
+  }
+
+  public int getIndex() {
+    return index;
+  }
+
+  @CheckForNull
+  public Date getDate() {
+    return date;
+  }
+}
index ec346aa4dccb784d193b7f7c57f98efe00f400bb..36bec004e4a9232fd8d907c45fa4214b428e6eb4 100644 (file)
@@ -27,7 +27,6 @@ import org.sonar.api.batch.RequiresDB;
 import org.sonar.api.database.DatabaseSession;
 import org.sonar.api.database.model.Snapshot;
 import org.sonar.api.resources.Qualifiers;
-import org.sonar.batch.deprecated.components.Period;
 import org.sonar.batch.deprecated.components.PeriodsDefinition;
 
 import javax.annotation.CheckForNull;
index 452fe02551cd94aacf285c0d1573bdbed2dc985d..f437ffa37446e448d7ae7e55a494687747a346cc 100644 (file)
@@ -20,9 +20,9 @@
 
 package org.sonar.batch.debt;
 
-import org.sonar.batch.components.TimeMachineConfiguration;
+import org.sonar.batch.components.Period;
 
-import org.sonar.batch.deprecated.components.Period;
+import org.sonar.batch.components.TimeMachineConfiguration;
 import com.google.common.collect.ImmutableList;
 import org.sonar.api.batch.Decorator;
 import org.sonar.api.batch.DecoratorBarriers;
diff --git a/sonar-batch/src/main/java/org/sonar/batch/deprecated/components/Period.java b/sonar-batch/src/main/java/org/sonar/batch/deprecated/components/Period.java
deleted file mode 100644 (file)
index 45ca282..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * SonarQube, open source software quality management tool.
- * Copyright (C) 2008-2014 SonarSource
- * mailto:contact AT sonarsource DOT com
- *
- * SonarQube is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 3 of the License, or (at your option) any later version.
- *
- * SonarQube is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- */
-
-package org.sonar.batch.deprecated.components;
-
-import javax.annotation.CheckForNull;
-import javax.annotation.Nullable;
-
-import java.util.Date;
-
-public class Period {
-
-  private int index;
-  private Date date;
-
-  public Period(int index, @Nullable Date date) {
-    this.index = index;
-    this.date = date;
-  }
-
-  public int getIndex() {
-    return index;
-  }
-
-  @CheckForNull
-  public Date getDate() {
-    return date;
-  }
-}
index f2afec0566af802bb5358e83816e7f6b5c64682a..4217c08bc4f2e53d608ef529fa04849812f1edfc 100644 (file)
@@ -97,6 +97,7 @@ public class FileIndexer implements BatchComponent {
   }
 
   private void waitForTasksToComplete() {
+    executorService.shutdown();
     for (Future<Void> task : tasks) {
       try {
         task.get();
index c930eb1075ef65ce3d18577431fa5e225f74ef10..fa7b4f9c4cbd29e6029f523bffb2fbf452c5d9f4 100644 (file)
@@ -20,9 +20,9 @@
 
 package org.sonar.batch.debt;
 
-import org.sonar.batch.components.TimeMachineConfiguration;
+import org.sonar.batch.components.Period;
 
-import org.sonar.batch.deprecated.components.Period;
+import org.sonar.batch.components.TimeMachineConfiguration;
 import org.apache.commons.lang.ObjectUtils;
 import org.apache.commons.lang.time.DateUtils;
 import org.junit.Before;