Skip to content

Commit

Permalink
null pointer fix
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisdchristo committed Mar 13, 2017
1 parent bbf5770 commit 3f56c2c
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/main/java/com/github/chrisdchristo/capsule/CapsuleMojo.java
Original file line number Diff line number Diff line change
Expand Up @@ -590,9 +590,13 @@ private void addFileSets(final JarOutputStream jar) throws IOException {

// get files entries based on direct files under dir (i.e ignore un sub dirs)
final Set<File> entries = new HashSet<>();
for (final File file : directory.listFiles()) {
if (!file.isDirectory())
entries.add(file);

final File[] files = directory.listFiles();
if (files != null) {
for (final File file : files) {
if (!file.isDirectory())
entries.add(file);
}
}

for (final File entry : entries) {
Expand Down

0 comments on commit 3f56c2c

Please sign in to comment.