typos & minor optimizations
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@6675 51baf565-9d33-0410-a72c-fc3788e3496d
This commit is contained in:
1 parent
12c5faef85
commit
2c907a02fe
2 files changed
+6
-8
No files matched your search
+3
-5
@@ -48,6 +48,7 @@ import net.sourceforge.pmd.eclipse.runtime.properties.IProjectPropertiesManager;
|
||||
import net.sourceforge.pmd.eclipse.runtime.properties.PropertiesException;
|
||||
import net.sourceforge.pmd.eclipse.runtime.writer.IRuleSetWriter;
|
||||
import net.sourceforge.pmd.eclipse.runtime.writer.WriterException;
|
||||
import net.sourceforge.pmd.util.StringUtil;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
import org.eclipse.core.resources.IFile;
|
||||
@@ -154,11 +155,8 @@ public class ProjectPropertiesImpl implements IProjectProperties {
|
||||
* @see net.sourceforge.pmd.eclipse.runtime.properties.IProjectProperties#getRuleSetFile()
|
||||
*/
|
||||
public String getRuleSetFile() {
|
||||
if (this.ruleSetFile == null || this.ruleSetFile.trim().length() == 0) {
|
||||
return PROJECT_RULESET_FILE;
|
||||
} else {
|
||||
return this.ruleSetFile;
|
||||
}
|
||||
|
||||
return StringUtil.isEmpty(ruleSetFile) ? PROJECT_RULESET_FILE : ruleSetFile;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+3
-3
@@ -330,7 +330,7 @@ public class ProjectPropertiesManagerImpl implements IProjectPropertiesManager {
|
||||
boolean flChanged = false;
|
||||
|
||||
if (!projectRuleSet.getRules().equals(pluginRuleSet.getRules())) {
|
||||
log.debug("The project ruleset is different from the plugin ruleset ; synchronizing.");
|
||||
log.debug("The project ruleset is different from the plugin ruleset; synchronizing.");
|
||||
|
||||
// 1-If rules have been deleted from preferences
|
||||
// delete them also from the project ruleset
|
||||
@@ -339,7 +339,7 @@ public class ProjectPropertiesManagerImpl implements IProjectPropertiesManager {
|
||||
final Rule projectRule = i.next();
|
||||
final Rule pluginRule = pluginRuleSet.getRuleByName(projectRule.getName());
|
||||
if (pluginRule == null) {
|
||||
log.debug("The rule " + projectRule.getName() + " is no more defined in the plugin ruleset. Remove it.");
|
||||
log.debug("The rule " + projectRule.getName() + " is not defined in the plugin ruleset. Remove it.");
|
||||
i.remove();
|
||||
}
|
||||
}
|
||||
@@ -357,7 +357,7 @@ public class ProjectPropertiesManagerImpl implements IProjectPropertiesManager {
|
||||
}
|
||||
|
||||
if (!ruleSet.getRules().equals(projectRuleSet.getRules())) {
|
||||
log.info("Set the projet ruleset according to preferences.");
|
||||
log.info("Set the project ruleset according to preferences.");
|
||||
projectProperties.setProjectRuleSet(ruleSet);
|
||||
flChanged = true;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user