aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/sonar-findbugs-plugin
diff options
context:
space:
mode:
authorEvgeny Mandrikov <mandrikov@gmail.com>2011-04-21 01:47:18 +0400
committerEvgeny Mandrikov <mandrikov@gmail.com>2011-04-21 01:48:34 +0400
commitec2974edf37405ed45328dd5885409dfc861ca63 (patch)
tree735160968285b7813bd2f66004b5aac21dc0b861 /plugins/sonar-findbugs-plugin
parent986b9dfe5b578402b3ecdb7ccde5abc5fe06f7da (diff)
downloadsonarqube-ec2974edf37405ed45328dd5885409dfc861ca63.tar.gz
sonarqube-ec2974edf37405ed45328dd5885409dfc861ca63.zip
SONAR-2341 Deprecate Project.getPackaging and don't use it in findbugs plugin
Diffstat (limited to 'plugins/sonar-findbugs-plugin')
-rw-r--r--plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/FindbugsSensor.java3
-rw-r--r--plugins/sonar-findbugs-plugin/src/test/java/org/sonar/plugins/findbugs/FindbugsSensorTest.java8
2 files changed, 1 insertions, 10 deletions
diff --git a/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/FindbugsSensor.java b/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/FindbugsSensor.java
index 5e23416870d..7a5b86c0830 100644
--- a/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/FindbugsSensor.java
+++ b/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/FindbugsSensor.java
@@ -47,8 +47,7 @@ public class FindbugsSensor implements Sensor {
public boolean shouldExecuteOnProject(Project project) {
return project.getFileSystem().hasJavaSourceFiles()
- && !profile.getActiveRulesByRepository(FindbugsConstants.REPOSITORY_KEY).isEmpty()
- && !StringUtils.equalsIgnoreCase(project.getPackaging(), "ear");
+ && !profile.getActiveRulesByRepository(FindbugsConstants.REPOSITORY_KEY).isEmpty();
}
public void analyse(Project project, SensorContext context) {
diff --git a/plugins/sonar-findbugs-plugin/src/test/java/org/sonar/plugins/findbugs/FindbugsSensorTest.java b/plugins/sonar-findbugs-plugin/src/test/java/org/sonar/plugins/findbugs/FindbugsSensorTest.java
index 24b8e5c9413..c7129175781 100644
--- a/plugins/sonar-findbugs-plugin/src/test/java/org/sonar/plugins/findbugs/FindbugsSensorTest.java
+++ b/plugins/sonar-findbugs-plugin/src/test/java/org/sonar/plugins/findbugs/FindbugsSensorTest.java
@@ -57,14 +57,6 @@ public class FindbugsSensorTest extends FindbugsTests {
}
@Test
- public void shouldNotExecuteOnEar() {
- Project project = createProject();
- when(project.getPackaging()).thenReturn("ear");
- FindbugsSensor analyser = new FindbugsSensor(createRulesProfileWithActiveRules(), new FakeRuleFinder(), null);
- assertFalse(analyser.shouldExecuteOnProject(project));
- }
-
- @Test
public void shouldExecuteFindbugsWhenNoReportProvided() throws Exception {
Project project = createProject();
FindbugsExecutor executor = mock(FindbugsExecutor.class);