Fix PMD dogfood issues in pmd-cs, pmd-jsp, pmd-javascript, pmd-test

This commit is contained in:
Andreas Dangel
2014-11-16 00:15:47 +01:00
parent f7f89f2921
commit 3a4caa5c7c
11 changed files with 45 additions and 39 deletions

View File

@ -17,7 +17,7 @@ public class DumpFacade {
private boolean recurse;
public void initializeWith(Writer writer, String prefix, boolean recurse, EcmascriptNode<?> node) {
this.writer = (writer instanceof PrintWriter) ? (PrintWriter) writer : new PrintWriter(writer);
this.writer = writer instanceof PrintWriter ? (PrintWriter) writer : new PrintWriter(writer);
this.recurse = recurse;
this.dump(node, prefix);
try {

View File

@ -132,14 +132,14 @@ public final class EcmascriptTreeBuilder implements NodeVisitor {
}
}
protected List<ParseProblem> parseProblems;
protected Map<ParseProblem, TrailingCommaNode> parseProblemToNode = new HashMap<ParseProblem, TrailingCommaNode>();
private List<ParseProblem> parseProblems;
private Map<ParseProblem, TrailingCommaNode> parseProblemToNode = new HashMap<ParseProblem, TrailingCommaNode>();
// The nodes having children built.
protected Stack<Node> nodes = new Stack<Node>();
private Stack<Node> nodes = new Stack<Node>();
// The Rhino nodes with children to build.
protected Stack<AstNode> parents = new Stack<AstNode>();
private Stack<AstNode> parents = new Stack<AstNode>();
private final SourceCodePositioner sourceCodePositioner;