minor refactoring
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@1389 51baf565-9d33-0410-a72c-fc3788e3496d
This commit is contained in:
@ -128,13 +128,7 @@ public class PMDTask extends Task {
|
|||||||
try {
|
try {
|
||||||
File file = new File(ds.getBasedir() + System.getProperty("file.separator") + srcFiles[j]);
|
File file = new File(ds.getBasedir() + System.getProperty("file.separator") + srcFiles[j]);
|
||||||
printIfVerbose (file.getAbsoluteFile().toString());
|
printIfVerbose (file.getAbsoluteFile().toString());
|
||||||
|
ctx.setSourceCodeFilename(shortFilenames ? srcFiles[j] : file.getAbsolutePath());
|
||||||
String fileName = file.getAbsolutePath();
|
|
||||||
if (shortFilenames) {
|
|
||||||
fileName = srcFiles[j];
|
|
||||||
}
|
|
||||||
ctx.setSourceCodeFilename(fileName);
|
|
||||||
|
|
||||||
pmd.processFile(new FileInputStream(file), rules, ctx);
|
pmd.processFile(new FileInputStream(file), rules, ctx);
|
||||||
} catch (FileNotFoundException fnfe) {
|
} catch (FileNotFoundException fnfe) {
|
||||||
if (failOnError) {
|
if (failOnError) {
|
||||||
|
Reference in New Issue
Block a user