Skip to content

Commit 7fb3390

Browse files
authored
Fix nullpointer in docs test setup (#90660) (#90711)
1 parent 1a9d584 commit 7fb3390

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

build-tools-internal/src/main/groovy/org/elasticsearch/gradle/internal/doc/RestTestsFromSnippetsTask.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@ class RestTestsFromSnippetsTask extends SnippetsTask {
384384
}
385385

386386
private void testTearDown(Snippet snippet) {
387-
if (previousTest.testSetup == false && lastDocsPath == snippet.path) {
387+
if (previousTest != null && previousTest.testSetup == false && lastDocsPath == snippet.path) {
388388
throw new InvalidUserDataException("$snippet must follow test setup or be first")
389389
}
390390
setupCurrent(snippet)

0 commit comments

Comments
 (0)