aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/measurefilters/package-info.java21
-rw-r--r--plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/package-info.java21
-rw-r--r--plugins/sonar-svn-plugin/src/main/java/org/sonar/plugins/scm/svn/SvnBlameCommand.java10
-rw-r--r--sonar-batch/src/main/java/org/sonar/batch/symbol/package-info.java21
4 files changed, 68 insertions, 5 deletions
diff --git a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/measurefilters/package-info.java b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/measurefilters/package-info.java
new file mode 100644
index 00000000000..4700c0a28ef
--- /dev/null
+++ b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/measurefilters/package-info.java
@@ -0,0 +1,21 @@
+/*
+ * 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.
+ */
+@javax.annotation.ParametersAreNonnullByDefault
+package org.sonar.plugins.core.measurefilters;
diff --git a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/package-info.java b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/package-info.java
new file mode 100644
index 00000000000..145b58bdc95
--- /dev/null
+++ b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/package-info.java
@@ -0,0 +1,21 @@
+/*
+ * 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.
+ */
+@javax.annotation.ParametersAreNonnullByDefault
+package org.sonar.plugins.core.sensors;
diff --git a/plugins/sonar-svn-plugin/src/main/java/org/sonar/plugins/scm/svn/SvnBlameCommand.java b/plugins/sonar-svn-plugin/src/main/java/org/sonar/plugins/scm/svn/SvnBlameCommand.java
index eb258af83ad..5b3746f5dcc 100644
--- a/plugins/sonar-svn-plugin/src/main/java/org/sonar/plugins/scm/svn/SvnBlameCommand.java
+++ b/plugins/sonar-svn-plugin/src/main/java/org/sonar/plugins/scm/svn/SvnBlameCommand.java
@@ -19,6 +19,7 @@
*/
package org.sonar.plugins.scm.svn;
+import com.google.common.annotations.VisibleForTesting;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.sonar.api.BatchComponent;
@@ -108,21 +109,20 @@ public class SvnBlameCommand implements BlameCommand, BatchComponent {
});
}
- public int execute(Command cl, StreamConsumer consumer, StreamConsumer stderr) {
+ private int execute(Command cl, StreamConsumer consumer, StreamConsumer stderr) {
LOG.debug("Executing: " + cl);
return commandExecutor.execute(cl, consumer, stderr, -1);
}
- public Command createCommandLine(File workingDirectory, String filename) {
+ @VisibleForTesting
+ Command createCommandLine(File baseDir, String filename) {
Command cl = Command.create("svn");
for (Entry<String, String> env : System.getenv().entrySet()) {
cl.setEnvironmentVariable(env.getKey(), env.getValue());
}
cl.setEnvironmentVariable("LC_MESSAGES", "en");
- if (workingDirectory != null) {
- cl.setDirectory(workingDirectory);
- }
+ cl.setDirectory(baseDir);
cl.addArgument("blame");
cl.addArgument("--xml");
cl.addArgument(filename);
diff --git a/sonar-batch/src/main/java/org/sonar/batch/symbol/package-info.java b/sonar-batch/src/main/java/org/sonar/batch/symbol/package-info.java
new file mode 100644
index 00000000000..2ac5be1323d
--- /dev/null
+++ b/sonar-batch/src/main/java/org/sonar/batch/symbol/package-info.java
@@ -0,0 +1,21 @@
+/*
+ * 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.
+ */
+@javax.annotation.ParametersAreNonnullByDefault
+package org.sonar.batch.symbol;