HHH-10715 Missing null check after File.listFiles
This commit is contained in:
parent
b518df7da4
commit
a7629c4382
|
@ -241,11 +241,15 @@ public class EnhancementTask extends Task {
|
||||||
|
|
||||||
private void walkDir(File dir, FileFilter classesFilter, FileFilter dirFilter) {
|
private void walkDir(File dir, FileFilter classesFilter, FileFilter dirFilter) {
|
||||||
File[] dirs = dir.listFiles( dirFilter );
|
File[] dirs = dir.listFiles( dirFilter );
|
||||||
for ( File dir1 : dirs ) {
|
if ( dirs != null ) {
|
||||||
walkDir( dir1, classesFilter, dirFilter );
|
for ( File dir1 : dirs ) {
|
||||||
|
walkDir( dir1, classesFilter, dirFilter );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
File[] files = dir.listFiles( classesFilter );
|
File[] files = dir.listFiles( classesFilter );
|
||||||
Collections.addAll( sourceSet, files );
|
if ( files != null ) {
|
||||||
|
Collections.addAll( sourceSet, files );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void writeOutEnhancedClass(byte[] enhancedBytecode, File file) throws BuildException {
|
private void writeOutEnhancedClass(byte[] enhancedBytecode, File file) throws BuildException {
|
||||||
|
|
Loading…
Reference in New Issue