Fix NPE in CodegenIgnoreProcessor.java (fixes #3356) (#7846)

Fixes NullPointerException when using an override ignore file with no parent.
This commit is contained in:
Jeff Brower
2020-11-11 10:22:51 -05:00
committed by GitHub
parent 13673962cb
commit ec13288c02

View File

@@ -142,7 +142,7 @@ public class CodegenIgnoreProcessor {
public boolean allowsFile(final File targetFile) {
if(this.ignoreFile == null) return true;
File file = new File(this.ignoreFile.getParentFile().toURI().relativize(targetFile.toURI()).getPath());
File file = new File(this.ignoreFile.getAbsoluteFile().getParentFile().toURI().relativize(targetFile.toURI()).getPath());
Boolean directoryExcluded = false;
Boolean exclude = false;
if(exclusionRules.size() == 0 && inclusionRules.size() == 0) {