Menu

#888 PMD 4.2.5 CPD GUI "by extension" mode doesn't find files

open
cpd (39)
5
2014-05-01
2009-07-31
No

The application was actually looks for files that ended with the string literal "BY_EXTENSION" (without the quotes) instead of ".ext" that I put inside the edit control on the application window. The properties["EXTENSION"] property is set to be ".ext" through the control on the application window; it is simply not respected at the lower levels of the application.

On line 37 of LanguageFactory.java, I was able to insert the following two lines...

if (LanguageFactory.BY_EXTENSION.equals(language)) {
return new AnyLanguage(properties.getProperty(LanguageFactory.EXTENSION));
}

...to have files with an arbitrary extension recognized, but I do not know whether this is the correct fix. That is, it seemed to work, but I don't understand the architecture of the application to know if this is the right fix at the right place in the source code or not.

Discussion


Log in to post a comment.