From 331b674d4108b788c6f9645f7658e9c9628899b1 Mon Sep 17 00:00:00 2001 From: Simon Brandhof Date: Mon, 5 Dec 2011 12:39:26 +0100 Subject: Fix some violations --- sonar-batch/src/main/java/org/sonar/batch/DefaultProfileLoader.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'sonar-batch/src') 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 648676eb7f2..27829ff9f06 100644 --- a/sonar-batch/src/main/java/org/sonar/batch/DefaultProfileLoader.java +++ b/sonar-batch/src/main/java/org/sonar/batch/DefaultProfileLoader.java @@ -27,8 +27,6 @@ import org.sonar.jpa.dao.ProfilesDao; public class DefaultProfileLoader implements ProfileLoader { static final String PARAM_PROFILE = "sonar.profile"; - private RulesProfile profile; - private ProfilesDao dao; public DefaultProfileLoader(ProfilesDao dao) { @@ -37,6 +35,7 @@ public class DefaultProfileLoader implements ProfileLoader { public RulesProfile load(Project project) { String profileName = (String) project.getProperty(PARAM_PROFILE); + RulesProfile profile; if (profileName == null) { Project root = project.getRoot(); profile = dao.getActiveProfile(root.getLanguageKey(), root.getKey()); @@ -58,7 +57,6 @@ public class DefaultProfileLoader implements ProfileLoader { activeRule.getRule().getParams().size(); } profile.getAlerts().size(); - return profile; } -- cgit v1.2.3