Skip to content

Commit

Permalink
NPE fix for #201
Browse files Browse the repository at this point in the history
  • Loading branch information
ssvaidyanathan committed Apr 15, 2024
1 parent 5b7ab9c commit ed827c4
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -481,10 +481,12 @@ private List<File> findConfigFiles(String scope, String config)
throws MojoExecutionException {
List<File> configFiles = new ArrayList<File>();
File[] listOfFiles = new File(configDir + File.separator + scope).listFiles();
for (File file : listOfFiles) {
if (file.isFile() && file.getName().startsWith(config)) {
configFiles.add(file);
}
if(listOfFiles!=null && listOfFiles.length>0) {
for (File file : listOfFiles) {
if (file.isFile() && file.getName().startsWith(config)) {
configFiles.add(file);
}
}
}
return configFiles;
}
Expand Down

0 comments on commit ed827c4

Please sign in to comment.