aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJulien HENRY <julien.henry@sonarsource.com>2013-03-26 18:04:19 +0100
committerJulien HENRY <julien.henry@sonarsource.com>2013-03-26 18:04:19 +0100
commit996c779bd2b0336bbb3d207d0fb3c5bcaab18fca (patch)
tree8733d8edd03cff6568e1494522eae47eac353db6
parent48194ccc089709e5050f4d883532bf58928c1bec (diff)
downloadsonarqube-996c779bd2b0336bbb3d207d0fb3c5bcaab18fca.tar.gz
sonarqube-996c779bd2b0336bbb3d207d0fb3c5bcaab18fca.zip
Fix some quality flaws
-rw-r--r--sonar-application/src/main/java/org/sonar/application/JettyEmbedder.java2
-rw-r--r--sonar-batch/src/main/java/org/sonar/batch/DefaultProfileLoader.java3
-rw-r--r--sonar-batch/src/main/java/org/sonar/batch/bootstrap/BatchExtensionDictionnary.java1
-rw-r--r--sonar-batch/src/main/java/org/sonar/batch/bootstrap/ExtensionInstaller.java1
-rw-r--r--sonar-batch/src/main/java/org/sonar/batch/bootstrap/ExtensionMatcher.java (renamed from sonar-batch/src/main/java/org/sonar/batch/scan/ExtensionMatcher.java)2
-rw-r--r--sonar-batch/src/main/java/org/sonar/batch/bootstrap/TaskContainer.java1
-rw-r--r--sonar-batch/src/main/java/org/sonar/batch/phases/SensorMatcher.java3
-rw-r--r--sonar-batch/src/main/java/org/sonar/batch/scan/ModuleScanContainer.java2
-rw-r--r--sonar-batch/src/main/java/org/sonar/batch/scan/ProjectScanContainer.java2
-rw-r--r--sonar-batch/src/test/java/org/sonar/batch/bootstrap/BatchExtensionDictionnaryTest.java1
-rw-r--r--sonar-batch/src/test/java/org/sonar/batch/bootstrap/ExtensionInstallerTest.java1
11 files changed, 9 insertions, 10 deletions
diff --git a/sonar-application/src/main/java/org/sonar/application/JettyEmbedder.java b/sonar-application/src/main/java/org/sonar/application/JettyEmbedder.java
index 6774d34cafa..fa49094e85f 100644
--- a/sonar-application/src/main/java/org/sonar/application/JettyEmbedder.java
+++ b/sonar-application/src/main/java/org/sonar/application/JettyEmbedder.java
@@ -107,7 +107,7 @@ public class JettyEmbedder {
return server;
}
- public RequestLogHandler configureRequestLogHandler(String filenamePattern) {
+ private RequestLogHandler configureRequestLogHandler(String filenamePattern) {
RequestLogHandler requestLogHandler = new RequestLogHandler();
NCSARequestLog requestLog = new NCSARequestLog(filenamePattern);
requestLog.setRetainDays(7);
diff --git a/sonar-batch/src/main/java/org/sonar/batch/DefaultProfileLoader.java b/sonar-batch/src/main/java/org/sonar/batch/DefaultProfileLoader.java
index a76c1e07622..333ff266532 100644
--- a/sonar-batch/src/main/java/org/sonar/batch/DefaultProfileLoader.java
+++ b/sonar-batch/src/main/java/org/sonar/batch/DefaultProfileLoader.java
@@ -37,8 +37,7 @@ public class DefaultProfileLoader implements ProfileLoader {
public RulesProfile load(Project project, Settings settings) {
String profileName = StringUtils.defaultIfBlank(
settings.getString("sonar.profile"),
- settings.getString("sonar.profile." + project.getLanguageKey())
- );
+ settings.getString("sonar.profile." + project.getLanguageKey()));
if (StringUtils.isBlank(profileName)) {
// This means that the current language is not supported by any installed plugin, otherwise at least a
diff --git a/sonar-batch/src/main/java/org/sonar/batch/bootstrap/BatchExtensionDictionnary.java b/sonar-batch/src/main/java/org/sonar/batch/bootstrap/BatchExtensionDictionnary.java
index e93d0a8d6a8..77f24b2d238 100644
--- a/sonar-batch/src/main/java/org/sonar/batch/bootstrap/BatchExtensionDictionnary.java
+++ b/sonar-batch/src/main/java/org/sonar/batch/bootstrap/BatchExtensionDictionnary.java
@@ -25,7 +25,6 @@ import org.sonar.api.BatchExtension;
import org.sonar.api.batch.CheckProject;
import org.sonar.api.platform.ComponentContainer;
import org.sonar.api.resources.Project;
-import org.sonar.batch.scan.ExtensionMatcher;
import java.util.Collection;
import java.util.List;
diff --git a/sonar-batch/src/main/java/org/sonar/batch/bootstrap/ExtensionInstaller.java b/sonar-batch/src/main/java/org/sonar/batch/bootstrap/ExtensionInstaller.java
index 27845de3b3b..dbe463d12e6 100644
--- a/sonar-batch/src/main/java/org/sonar/batch/bootstrap/ExtensionInstaller.java
+++ b/sonar-batch/src/main/java/org/sonar/batch/bootstrap/ExtensionInstaller.java
@@ -26,7 +26,6 @@ import org.sonar.api.config.Settings;
import org.sonar.api.platform.ComponentContainer;
import org.sonar.api.platform.PluginMetadata;
import org.sonar.batch.bootstrapper.EnvironmentInformation;
-import org.sonar.batch.scan.ExtensionMatcher;
import javax.annotation.Nullable;
diff --git a/sonar-batch/src/main/java/org/sonar/batch/scan/ExtensionMatcher.java b/sonar-batch/src/main/java/org/sonar/batch/bootstrap/ExtensionMatcher.java
index 231314d9c3d..ea755e696ae 100644
--- a/sonar-batch/src/main/java/org/sonar/batch/scan/ExtensionMatcher.java
+++ b/sonar-batch/src/main/java/org/sonar/batch/bootstrap/ExtensionMatcher.java
@@ -17,7 +17,7 @@
* License along with Sonar; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
*/
-package org.sonar.batch.scan;
+package org.sonar.batch.bootstrap;
/**
* @since 3.6
diff --git a/sonar-batch/src/main/java/org/sonar/batch/bootstrap/TaskContainer.java b/sonar-batch/src/main/java/org/sonar/batch/bootstrap/TaskContainer.java
index 2533e3cff88..a3931e45ee1 100644
--- a/sonar-batch/src/main/java/org/sonar/batch/bootstrap/TaskContainer.java
+++ b/sonar-batch/src/main/java/org/sonar/batch/bootstrap/TaskContainer.java
@@ -27,7 +27,6 @@ import org.sonar.api.task.Task;
import org.sonar.api.task.TaskDefinition;
import org.sonar.api.task.TaskExtension;
import org.sonar.api.utils.SonarException;
-import org.sonar.batch.scan.ExtensionMatcher;
import org.sonar.batch.scan.ScanTask;
import org.sonar.batch.tasks.ListTask;
import org.sonar.batch.tasks.Tasks;
diff --git a/sonar-batch/src/main/java/org/sonar/batch/phases/SensorMatcher.java b/sonar-batch/src/main/java/org/sonar/batch/phases/SensorMatcher.java
index f660fff25ab..2c27cce49d3 100644
--- a/sonar-batch/src/main/java/org/sonar/batch/phases/SensorMatcher.java
+++ b/sonar-batch/src/main/java/org/sonar/batch/phases/SensorMatcher.java
@@ -19,11 +19,12 @@
*/
package org.sonar.batch.phases;
+import org.sonar.batch.bootstrap.ExtensionMatcher;
+
import org.apache.commons.lang.ClassUtils;
import org.sonar.api.BatchExtension;
import org.sonar.api.batch.InstantiationStrategy;
import org.sonar.api.batch.Sensor;
-import org.sonar.batch.scan.ExtensionMatcher;
/**
* Allow to filter sensors that will be executed.
diff --git a/sonar-batch/src/main/java/org/sonar/batch/scan/ModuleScanContainer.java b/sonar-batch/src/main/java/org/sonar/batch/scan/ModuleScanContainer.java
index ae0d6a65ccf..63f33ed48c7 100644
--- a/sonar-batch/src/main/java/org/sonar/batch/scan/ModuleScanContainer.java
+++ b/sonar-batch/src/main/java/org/sonar/batch/scan/ModuleScanContainer.java
@@ -19,6 +19,8 @@
*/
package org.sonar.batch.scan;
+import org.sonar.batch.bootstrap.ExtensionMatcher;
+
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.sonar.api.BatchExtension;
diff --git a/sonar-batch/src/main/java/org/sonar/batch/scan/ProjectScanContainer.java b/sonar-batch/src/main/java/org/sonar/batch/scan/ProjectScanContainer.java
index ef27bf500e5..aeb6df0de2d 100644
--- a/sonar-batch/src/main/java/org/sonar/batch/scan/ProjectScanContainer.java
+++ b/sonar-batch/src/main/java/org/sonar/batch/scan/ProjectScanContainer.java
@@ -19,6 +19,8 @@
*/
package org.sonar.batch.scan;
+import org.sonar.batch.bootstrap.ExtensionMatcher;
+
import org.sonar.api.BatchExtension;
import org.sonar.api.batch.InstantiationStrategy;
import org.sonar.api.platform.ComponentContainer;
diff --git a/sonar-batch/src/test/java/org/sonar/batch/bootstrap/BatchExtensionDictionnaryTest.java b/sonar-batch/src/test/java/org/sonar/batch/bootstrap/BatchExtensionDictionnaryTest.java
index 16077cd9511..8a149f24cff 100644
--- a/sonar-batch/src/test/java/org/sonar/batch/bootstrap/BatchExtensionDictionnaryTest.java
+++ b/sonar-batch/src/test/java/org/sonar/batch/bootstrap/BatchExtensionDictionnaryTest.java
@@ -25,7 +25,6 @@ import org.sonar.api.batch.Sensor;
import org.sonar.api.batch.SensorContext;
import org.sonar.api.platform.ComponentContainer;
import org.sonar.api.resources.Project;
-import org.sonar.batch.scan.ExtensionMatcher;
import java.util.Collection;
diff --git a/sonar-batch/src/test/java/org/sonar/batch/bootstrap/ExtensionInstallerTest.java b/sonar-batch/src/test/java/org/sonar/batch/bootstrap/ExtensionInstallerTest.java
index 97941425e1a..bb87f32e190 100644
--- a/sonar-batch/src/test/java/org/sonar/batch/bootstrap/ExtensionInstallerTest.java
+++ b/sonar-batch/src/test/java/org/sonar/batch/bootstrap/ExtensionInstallerTest.java
@@ -31,7 +31,6 @@ import org.sonar.api.config.Settings;
import org.sonar.api.platform.ComponentContainer;
import org.sonar.api.platform.PluginMetadata;
import org.sonar.batch.bootstrapper.EnvironmentInformation;
-import org.sonar.batch.scan.ExtensionMatcher;
import java.util.Arrays;
import java.util.List;