Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -368,25 +368,23 @@ protected Map<File, PmdFileInfo> getFilesToProcess() throws IOException {
return files;
}

private boolean isDirectoryExcluded(Collection<File> excludeRootFiles, File sourceDirectoryToCheck) {
boolean returnVal = false;
for (File excludeDir : excludeRootFiles) {
private boolean isDirectoryExcluded(Collection<File> excludedRootFiles, File sourceDirectoryToCheck) {
for (File excludedDirectory : excludedRootFiles) {
try {
if (sourceDirectoryToCheck
.getCanonicalFile()
.toPath()
.startsWith(excludeDir.getCanonicalFile().toPath())) {
.startsWith(excludedDirectory.getCanonicalFile().toPath())) {
getLog().debug("Directory " + sourceDirectoryToCheck.getAbsolutePath()
+ " has been excluded as it matches excludeRoot "
+ excludeDir.getAbsolutePath());
returnVal = true;
break;
+ excludedDirectory.getAbsolutePath());
return true;
}
} catch (IOException e) {
getLog().warn("Error while checking " + sourceDirectoryToCheck + " whether it should be excluded.", e);
getLog().warn("Error while checking whether " + sourceDirectoryToCheck + " should be excluded.", e);
}
}
return returnVal;
return false;
}

/**
Expand Down