Skip to content

Commit

Permalink
Fix nullpointer in docs test setup (#90660) (#90711)
Browse files Browse the repository at this point in the history
  • Loading branch information
breskeby committed Oct 6, 2022
1 parent 1a9d584 commit 7fb3390
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ class RestTestsFromSnippetsTask extends SnippetsTask {
}

private void testTearDown(Snippet snippet) {
if (previousTest.testSetup == false && lastDocsPath == snippet.path) {
if (previousTest != null && previousTest.testSetup == false && lastDocsPath == snippet.path) {
throw new InvalidUserDataException("$snippet must follow test setup or be first")
}
setupCurrent(snippet)
Expand Down

0 comments on commit 7fb3390

Please sign in to comment.