pmd: fix #1030 CPD Java.lang.IndexOutOfBoundsException: Index:

This commit is contained in:
Andreas Dangel 2013-01-26 19:48:39 +01:00
parent 52b8be6601
commit e603844a53
2 changed files with 3 additions and 1 deletions

View File

@ -9,6 +9,7 @@ Fixed bug 1012: False positive: Useless parentheses.
Fixed bug 1020: Parsing Error
Fixed bug 1026: PMD doesn't handle 'value =' in SuppressWarnings annotation
Fixed bug 1028: False-positive: Compare objects with equals for Enums
Fixed bug 1030: CPD Java.lang.IndexOutOfBoundsException: Index:
Fixed bug 1037: Facing a showstopper issue in PMD Report Class (report listeners)
Fixed bug 1039: pmd-nicerhtml.xsl is packaged in wrong location
Fixed bug 1043: node.getEndLine() always returns 0 (ECMAscript)

View File

@ -31,6 +31,8 @@ public class CPD {
public CPD(CPDConfiguration theConfiguration) {
configuration = theConfiguration;
// before we start any tokenizing (add(File...)), we need to reset the static TokenEntry status
TokenEntry.clearImages();
}
public void setCpdListener(CPDListener cpdListener) {
@ -38,7 +40,6 @@ public class CPD {
}
public void go() {
TokenEntry.clearImages();
matchAlgorithm = new MatchAlgorithm(
source, tokens,
configuration.minimumTileSize(),