Skip to content
This repository was archived by the owner on Sep 16, 2024. It is now read-only.

Commit 682b730

Browse files
committed
Fixing null pointer issue with custom forests
1 parent 4bff00c commit 682b730

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/main/java/com/marklogic/appdeployer/command/forests/DeployCustomForestsCommand.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,11 @@ public DeployCustomForestsCommand() {
2222
@Override
2323
public void execute(CommandContext context) {
2424
File dir = new File(context.getAppConfig().getConfigDir().getBaseDir(), "forests");
25-
for (File f : dir.listFiles()) {
26-
if (f.isDirectory()) {
27-
processDirectory(f, context);
25+
if (dir != null && dir.exists()) {
26+
for (File f : dir.listFiles()) {
27+
if (f.isDirectory()) {
28+
processDirectory(f, context);
29+
}
2830
}
2931
}
3032
}

0 commit comments

Comments
 (0)