Skip to content

Commit 414b0fb

Browse files
committed
Handling possible null-pointers when exporting resources
1 parent f0ce22b commit 414b0fb

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

src/main/groovy/com/marklogic/gradle/task/export/ExportResourcesTask.groovy

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,13 +65,17 @@ class ExportResourcesTask extends MarkLogicTask {
6565
ExportedResources resources = exporter.select(selector).export(path)
6666

6767
println "Exported files:"
68-
for (File f : resources.getFiles()) {
69-
println f.getAbsolutePath()
68+
if (resources.getFiles() != null) {
69+
for (File f : resources.getFiles()) {
70+
println f.getAbsolutePath()
71+
}
7072
}
7173

7274
println "Export messages:"
73-
for (String s : resources.getMessages()) {
74-
println s
75+
if (resources.getMessages() != null) {
76+
for (String s : resources.getMessages()) {
77+
println s
78+
}
7579
}
7680
}
7781
}

0 commit comments

Comments
 (0)