Checking in some Java 5 changes

git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5001 51baf565-9d33-0410-a72c-fc3788e3496d
This commit is contained in:
Xavier Le Vourch
2007-01-29 01:39:20 +00:00
parent 332773291e
commit 47930af177
12 changed files with 19 additions and 19 deletions

View File

@ -144,7 +144,7 @@ public class JavaParser {
return res;
}
public Map getExcludeMap() {
public Map<Integer, String> getExcludeMap() {
return token_source.getExcludeMap();
}
@ -156,13 +156,13 @@ public class JavaParser {
}
PARSER_END(JavaParser)
TOKEN_MGR_DECLS : {
private Map excludeMap = new HashMap();
private Map<Integer, String> excludeMap = new HashMap<Integer, String>();
private String excludeMarker = PMD.EXCLUDE_MARKER;
public void setExcludeMarker(String marker) {
this.excludeMarker = marker;
}
public Map getExcludeMap() {
public Map<Integer, String> getExcludeMap() {
return excludeMap;
}
}

View File

@ -116,13 +116,13 @@ public class Report {
private Set<Metric> metrics = new HashSet<Metric>();
private List<ReportListener> listeners = new ArrayList<ReportListener>();
private List<ProcessingError> errors = new ArrayList<ProcessingError>();
private Map linesToExclude = new HashMap();
private Map<Integer, String> linesToExclude = new HashMap<Integer, String>();
private long start;
private long end;
private List<SuppressedViolation> suppressedRuleViolations = new ArrayList<SuppressedViolation>();
public void exclude(Map lines) {
public void exclude(Map<Integer, String> lines) {
linesToExclude = lines;
}
@ -179,7 +179,7 @@ public class Report {
// NOPMD excluder
Integer line = new Integer(violation.getBeginLine());
if (linesToExclude.keySet().contains(line)) {
suppressedRuleViolations.add(new SuppressedViolation(violation, true, (String)linesToExclude.get(line)));
suppressedRuleViolations.add(new SuppressedViolation(violation, true, linesToExclude.get(line)));
return;
}

View File

@ -27,7 +27,7 @@ public class RuleContext {
this.sourceCodeFilename = filename;
}
public void excludeLines(Map lines) {
public void excludeLines(Map<Integer, String> lines) {
report.exclude(lines);
}

View File

@ -79,7 +79,7 @@ public class JavaParser/*@bgen(jjtree)*/implements JavaParserTreeConstants, Java
return res;
}
public Map getExcludeMap() {
public Map<Integer, String> getExcludeMap() {
return token_source.getExcludeMap();
}

View File

@ -5,13 +5,13 @@ import net.sourceforge.pmd.PMD;
public class JavaParserTokenManager implements JavaParserConstants
{
private Map excludeMap = new HashMap();
private Map<Integer, String> excludeMap = new HashMap<Integer, String>();
private String excludeMarker = PMD.EXCLUDE_MARKER;
public void setExcludeMarker(String marker) {
this.excludeMarker = marker;
}
public Map getExcludeMap() {
public Map<Integer, String> getExcludeMap() {
return excludeMap;
}
public java.io.PrintStream debugStream = System.out;

View File

@ -24,7 +24,7 @@ public class Java13Parser implements Parser {
return parser.CompilationUnit();
}
public Map getExcludeMap() {
public Map<Integer, String> getExcludeMap() {
return parser.getExcludeMap();
}

View File

@ -23,7 +23,7 @@ public class Java14Parser implements Parser {
return parser.CompilationUnit();
}
public Map getExcludeMap() {
public Map<Integer, String> getExcludeMap() {
return parser.getExcludeMap();
}

View File

@ -24,7 +24,7 @@ public class Java15Parser implements Parser {
return parser.CompilationUnit();
}
public Map getExcludeMap() {
public Map<Integer, String> getExcludeMap() {
return parser.getExcludeMap();
}

View File

@ -23,7 +23,7 @@ public class Java16Parser implements Parser {
return parser.CompilationUnit();
}
public Map getExcludeMap() {
public Map<Integer, String> getExcludeMap() {
return parser.getExcludeMap();
}

View File

@ -13,8 +13,8 @@ public class JspParser implements Parser {
return new net.sourceforge.pmd.jsp.ast.JspParser(new JspCharStream(source)).CompilationUnit();
}
public Map getExcludeMap() {
return new HashMap(); // FIXME
public Map<Integer, String> getExcludeMap() {
return new HashMap<Integer, String>(); // FIXME
}
public void setExcludeMarker(String marker) {

View File

@ -22,7 +22,7 @@ public interface Parser {
*/
Object parse(Reader source) throws ParseException;
Map getExcludeMap();
Map<Integer, String> getExcludeMap();
void setExcludeMarker(String marker);

View File

@ -22,8 +22,8 @@ public class JspTypeHandler implements SourceTypeHandler {
return new net.sourceforge.pmd.jsp.ast.JspParser(new JspCharStream(source))
.CompilationUnit();
}
public Map getExcludeMap() {
return new HashMap();
public Map<Integer, String> getExcludeMap() {
return new HashMap<Integer, String>();
}
public void setExcludeMarker(String marker) {}
};