removed unused variables, fixed compilation errors
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@1075 51baf565-9d33-0410-a72c-fc3788e3496d
This commit is contained in:
@ -28,7 +28,7 @@
|
||||
<li>Classes which could be Singletons</li>
|
||||
<li>Short/long variable and method names</li>
|
||||
</ul>
|
||||
<p>You can get the current release, plugins for JEdit, JBuilder, Eclipse, and Emacs, and lots of other project information <a href="http://sf.net/projects/pmd/">here</a></p>
|
||||
<p>You can get the current release, plugins for JEdit, JBuilder, IntelliJ IDEA, Maven, Ant, Eclipse, and Emacs, and lots of other project information <a href="http://sf.net/projects/pmd/">here</a></p>
|
||||
<p>PMD is sponsored by the <a href="http://www.cougaar.org/">Cougaar</a> program.</p>
|
||||
]]>
|
||||
</description>
|
||||
|
@ -5,11 +5,8 @@
|
||||
*/
|
||||
package test.net.sourceforge.pmd;
|
||||
|
||||
import net.sourceforge.pmd.Rule;
|
||||
import net.sourceforge.pmd.renderers.Renderer;
|
||||
import net.sourceforge.pmd.RuleContext;
|
||||
import net.sourceforge.pmd.RuleViolation;
|
||||
import net.sourceforge.pmd.Report;
|
||||
import net.sourceforge.pmd.*;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
@ -18,7 +15,7 @@ public class MockRule implements Rule {
|
||||
private String name;
|
||||
private String desc;
|
||||
private Set violations = new HashSet();
|
||||
private Properties properties = new Properties();
|
||||
private RuleProperties properties = new RuleProperties();
|
||||
private String description;
|
||||
private String example;
|
||||
private boolean m_include;
|
||||
@ -44,7 +41,7 @@ public class MockRule implements Rule {
|
||||
}
|
||||
|
||||
public void addProperty(String name, String value) {
|
||||
properties.put(name, value);
|
||||
properties.setProperty(name, value);
|
||||
}
|
||||
|
||||
public int getIntProperty(String name) {
|
||||
@ -63,7 +60,7 @@ public class MockRule implements Rule {
|
||||
return properties.getProperty(name);
|
||||
}
|
||||
|
||||
public Properties getProperties()
|
||||
public RuleProperties getProperties()
|
||||
{
|
||||
return properties;
|
||||
}
|
||||
|
@ -11,11 +11,7 @@ import java.util.Set;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
import net.sourceforge.pmd.PMDException;
|
||||
import net.sourceforge.pmd.Rule;
|
||||
import net.sourceforge.pmd.RuleSet;
|
||||
import net.sourceforge.pmd.RuleSetReader;
|
||||
import net.sourceforge.pmd.RuleSetWriter;
|
||||
import net.sourceforge.pmd.*;
|
||||
|
||||
|
||||
/**
|
||||
@ -120,8 +116,8 @@ public class RuleSetReadWriteTest extends TestCase
|
||||
assertEquals("Rule descriptions are equal.", ruleIn.getDescription(), ruleOut.getDescription());
|
||||
assertEquals("Rule examples are equal.", ruleIn.getExample(), ruleOut.getExample());
|
||||
|
||||
Properties propertiesIn = ruleIn.getProperties();
|
||||
Properties propertiesOut = ruleOut.getProperties();
|
||||
RuleProperties propertiesIn = ruleIn.getProperties();
|
||||
RuleProperties propertiesOut = ruleOut.getProperties();
|
||||
int propertiesInCount = propertiesIn.size();
|
||||
int propertiesOutCount = propertiesOut.size();
|
||||
|
||||
|
@ -30,7 +30,7 @@ public class PMD {
|
||||
try {
|
||||
JavaParser parser = new JavaParser(reader);
|
||||
ASTCompilationUnit c = parser.CompilationUnit();
|
||||
//c.dump("");
|
||||
c.dump("");
|
||||
SymbolFacade stb = new SymbolFacade();
|
||||
stb.initializeWith(c);
|
||||
ctx.setSymbolTableBuilder(stb);
|
||||
|
@ -8567,7 +8567,6 @@ public class JavaParser/*@bgen(jjtree)*/implements JavaParserTreeConstants, Java
|
||||
private Token jj_scanpos, jj_lastpos;
|
||||
private int jj_la;
|
||||
public boolean lookingAhead = false;
|
||||
private boolean jj_semLA;
|
||||
private int jj_gen;
|
||||
final private int[] jj_la1 = new int[113];
|
||||
final private int[] jj_la1_0 = {0x0,0x0,0x10081000,0x0,0x1000,0x10001000,0x10001000,0x4000000,0x0,0x510cb000,0x10001000,0x10001000,0x5104a000,0x10001000,0x10001000,0x1000,0x1000,0x10001000,0x10001000,0x4000000,0x510cb000,0x5104a000,0x10000000,0x10000000,0x0,0x0,0x0,0x4904a000,0x4904a000,0x0,0x10001000,0x10001000,0x0,0x0,0x0,0x0,0x5104a000,0x10000000,0x0,0x0,0x0,0xd9ace000,0x4904a000,0x0,0x4104a000,0x0,0x4104a000,0x4104a000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x4904a000,0x0,0x0,0x4904a000,0x8000000,0x0,0x0,0x0,0x0,0x8000000,0x0,0x0,0x8000000,0x8000000,0x4904a000,0x0,0x0,0x0,0x0,0x0,0x0,0xc9a4e000,0xd9ace000,0xc9ace000,0x10000000,0x0,0x0,0x0,0x4904a000,0x410000,0xd9ace000,0x410000,0x2000000,0x5904a000,0x4904a000,0x4904a000,0x4904a000,0x0,0x0,0x0,0x4904a000,0x20000,0x20000000,0x0,};
|
||||
|
@ -859,11 +859,6 @@ private final void jjCheckNAddStates(int start, int end)
|
||||
jjCheckNAdd(jjnextStates[start]);
|
||||
} while (start++ != end);
|
||||
}
|
||||
private final void jjCheckNAddStates(int start)
|
||||
{
|
||||
jjCheckNAdd(jjnextStates[start]);
|
||||
jjCheckNAdd(jjnextStates[start + 1]);
|
||||
}
|
||||
static final long[] jjbitVec0 = {
|
||||
0xfffffffffffffffeL, 0xffffffffffffffffL, 0xffffffffffffffffL, 0xffffffffffffffffL
|
||||
};
|
||||
@ -890,12 +885,11 @@ static final long[] jjbitVec8 = {
|
||||
};
|
||||
private final int jjMoveNfa_0(int startState, int curPos)
|
||||
{
|
||||
int[] nextStates;
|
||||
int startsAt = 0;
|
||||
jjnewStateCnt = 57;
|
||||
int i = 1;
|
||||
jjstateSet[0] = startState;
|
||||
int j, kind = 0x7fffffff;
|
||||
int kind = 0x7fffffff;
|
||||
for (;;)
|
||||
{
|
||||
if (++jjround == 0x7fffffff)
|
||||
@ -1521,7 +1515,6 @@ int jjmatchedKind;
|
||||
|
||||
public final Token getNextToken()
|
||||
{
|
||||
int kind;
|
||||
Token specialToken = null;
|
||||
Token matchedToken;
|
||||
int curPos = 0;
|
||||
|
@ -94,7 +94,7 @@ public class TokenMgrError extends Error
|
||||
* curchar : the offending character
|
||||
* Note: You can customize the lexical error message by modifying this method.
|
||||
*/
|
||||
private static final String LexicalError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar) {
|
||||
private static final String LexicalError(boolean EOFSeen, int errorLine, int errorColumn, String errorAfter, char curChar) {
|
||||
return("Lexical error at line " +
|
||||
errorLine + ", column " +
|
||||
errorColumn + ". Encountered: " +
|
||||
@ -128,6 +128,6 @@ public class TokenMgrError extends Error
|
||||
}
|
||||
|
||||
public TokenMgrError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar, int reason) {
|
||||
this(LexicalError(EOFSeen, lexState, errorLine, errorColumn, errorAfter, curChar), reason);
|
||||
this(LexicalError(EOFSeen, errorLine, errorColumn, errorAfter, curChar), reason);
|
||||
}
|
||||
}
|
||||
|
@ -330,9 +330,6 @@ class PreferencesEditor extends JDialog
|
||||
}
|
||||
|
||||
JFileChooser fileChooser = new JFileChooser(file);
|
||||
int windowWidth = fileChooser.getWidth();
|
||||
int windowHeight = fileChooser.getHeight();
|
||||
Dimension screenSize = getToolkit().getScreenSize();
|
||||
fileChooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
|
||||
fileChooser.setApproveButtonText("Select");
|
||||
fileChooser.setMinimumSize(new Dimension(500, 500));
|
||||
|
Reference in New Issue
Block a user