minor cleanup
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@7166 51baf565-9d33-0410-a72c-fc3788e3496d
This commit is contained in:
1 parent
224986ba86
commit
ba533394dc
3 files changed
+5
-4
No files matched your search
@@ -137,7 +137,7 @@ public class CommandLineOptions {
|
||||
String languageName = args[optionsIndex + LANGUAGE_NAME_INDEX];
|
||||
Language language = Language.findByTerseName(languageName);
|
||||
if (language == null) {
|
||||
throw new IllegalArgumentException("Unknown Language '" + languageName + "'. Available Languages are : "
|
||||
throw new IllegalArgumentException("Unknown language '" + languageName + "'. Available Languages are : "
|
||||
+ Language.commaSeparatedTerseNames(Language.findWithRuleSupport()));
|
||||
} else {
|
||||
if (args.length > (optionsIndex + LANGUAGE_VERSION_INDEX)) {
|
||||
@@ -152,7 +152,7 @@ public class CommandLineOptions {
|
||||
}
|
||||
}
|
||||
throw new IllegalArgumentException("Language version '" + version
|
||||
+ "' is not availaible for Language '" + language.getName()
|
||||
+ "' is not available for language '" + language.getName()
|
||||
+ "'.\nAvailable versions are :"
|
||||
+ LanguageVersion.commaSeparatedTerseNames(languageVersions));
|
||||
}
|
||||
|
||||
@@ -74,7 +74,7 @@ public class RuleSets {
|
||||
* @return Set
|
||||
*/
|
||||
public Set<Rule> getAllRules() {
|
||||
HashSet<Rule> result = new HashSet<Rule>();
|
||||
Set<Rule> result = new HashSet<Rule>();
|
||||
for (RuleSet r : ruleSets) {
|
||||
result.addAll(r.getRules());
|
||||
}
|
||||
|
||||
@@ -16,6 +16,7 @@ import java.util.Properties;
|
||||
import net.sourceforge.pmd.Report;
|
||||
import net.sourceforge.pmd.renderers.Renderer;
|
||||
import net.sourceforge.pmd.renderers.RendererFactory;
|
||||
import net.sourceforge.pmd.util.StringUtil;
|
||||
|
||||
import org.apache.tools.ant.BuildException;
|
||||
import org.apache.tools.ant.types.Parameter;
|
||||
@@ -114,7 +115,7 @@ public class Formatter {
|
||||
|
||||
// FIXME - hm, what about this consoleRenderer thing... need a test for this
|
||||
private Renderer createRenderer() {
|
||||
if ("".equals(type)) {
|
||||
if (StringUtil.isEmpty(type)) {
|
||||
throw new BuildException(unknownRendererMessage("<unspecified>"));
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user