code cleanup: PMD on PMD

git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@4949 51baf565-9d33-0410-a72c-fc3788e3496d
This commit is contained in:
Xavier Le Vourch
2007-01-16 01:08:58 +00:00
parent d35f00bdd5
commit 9fba2a117d
7 changed files with 5 additions and 10 deletions

View File

@ -17,8 +17,8 @@ public final class Language {
private static final String JSP_RULE_LANGUAGE_NAME = "jsp";
private static final String JAVA_RULE_LANGUAGE_NAME = "java";
public static Language JAVA = new Language(JAVA_RULE_LANGUAGE_NAME);
public static Language JSP = new Language(JSP_RULE_LANGUAGE_NAME);
public static final Language JAVA = new Language(JAVA_RULE_LANGUAGE_NAME);
public static final Language JSP = new Language(JSP_RULE_LANGUAGE_NAME);
/**

View File

@ -171,7 +171,7 @@ public class CPDTask extends Task {
}
public static class LanguageAttribute extends EnumeratedAttribute {
private String[] LANGUAGES = new String[]{LanguageFactory.JAVA_KEY, LanguageFactory.JSP_KEY, LanguageFactory.CPP_KEY, LanguageFactory.C_KEY, LanguageFactory.PHP_KEY, LanguageFactory.RUBY_KEY };
private static final String[] LANGUAGES = new String[]{LanguageFactory.JAVA_KEY, LanguageFactory.JSP_KEY, LanguageFactory.CPP_KEY, LanguageFactory.C_KEY, LanguageFactory.PHP_KEY, LanguageFactory.RUBY_KEY };
public String[] getValues() {
return LANGUAGES;
}

View File

@ -13,8 +13,6 @@ import java.util.ArrayList;
import java.util.List;
public class CPPTokenizer implements Tokenizer {
protected String EOL = System.getProperty("line.separator", "\n");
private static SimpleCharStream charStream;
public void tokenize(SourceCode sourceCode, Tokens tokenEntries) {

View File

@ -6,7 +6,6 @@ package net.sourceforge.pmd.cpd;
import net.sourceforge.pmd.PMD;
import java.io.File;
import java.io.FileReader;
import java.io.LineNumberReader;
import java.io.Reader;
import java.io.StringReader;
@ -138,4 +137,4 @@ public class SourceCode {
public String getFileName() {
return cl.getFileName();
}
}
}

View File

@ -15,7 +15,6 @@ import net.sourceforge.pmd.ast.ASTPrimitiveType;
import net.sourceforge.pmd.ast.ASTType;
import net.sourceforge.pmd.ast.ASTVariableDeclarator;
import net.sourceforge.pmd.ast.ASTVariableDeclaratorId;
import net.sourceforge.pmd.ast.AccessNode;
import net.sourceforge.pmd.properties.StringProperty;
public class VariableNamingConventions extends AbstractRule {

View File

@ -22,7 +22,7 @@ import net.sourceforge.pmd.properties.IntegerProperty;
*/
public abstract class StatisticalRule extends AbstractRule {
public static double DELTA = 0.000005; // Within this range. . .
public static final double DELTA = 0.000005; // Within this range. . .
private SortedSet dataPoints = new TreeSet();

View File

@ -50,7 +50,6 @@ import java.awt.event.ComponentEvent;
import java.awt.event.KeyEvent;
import java.io.IOException;
import java.io.StringReader;
import java.io.StringWriter;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.Enumeration;