diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/AfterAll.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/AfterAll.java index c210c30d74ed..2cfcb27e7834 100644 --- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/AfterAll.java +++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/AfterAll.java @@ -29,14 +29,14 @@ * *
{@code @AfterAll} methods must not be {@code private} and must be - * {@code static} by default. Consequently, {@code @AfterAll} methods are not + * {@code @AfterAll} methods must have a {@code void} return type, + * must not be {@code private}, and must be {@code static} by default. + * Consequently, {@code @AfterAll} methods are not * supported in {@link Nested @Nested} test classes or as interface default * methods unless the test class is annotated with * {@link TestInstance @TestInstance(Lifecycle.PER_CLASS)}. {@code @AfterAll} * methods may optionally declare parameters to be resolved by * {@link org.junit.jupiter.api.extension.ParameterResolver ParameterResolvers}. - * {@code @AfterAll} methods must not return a value. * *
{@code @AfterEach} methods must not be {@code private}, must not be - * {@code static}, and may optionally declare parameters to be resolved by + * {@code @AfterEach} methods must have a {@code void} return type, + * must not be {@code private}, and must not be {@code static}. + * They may optionally declare parameters to be resolved by * {@link org.junit.jupiter.api.extension.ParameterResolver ParameterResolvers}. - * {@code @AfterEach} methods must not return a value. * *
{@code @BeforeAll} methods must not be {@code private} and must be - * {@code static} by default. Consequently, {@code @BeforeAll} methods are not + * {@code @BeforeAll} methods must have a {@code void} return type, + * must not be {@code private}, and must be {@code static} by default. + * Consequently, {@code @BeforeAll} methods are not * supported in {@link Nested @Nested} test classes or as interface default * methods unless the test class is annotated with * {@link TestInstance @TestInstance(Lifecycle.PER_CLASS)}. {@code @BeforeAll} * methods may optionally declare parameters to be resolved by * {@link org.junit.jupiter.api.extension.ParameterResolver ParameterResolvers}. - * {@code @BeforeAll} methods must not return a value. * *
{@code @BeforeEach} methods must not be {@code private}, must not be - * {@code static}, and may optionally declare parameters to be resolved by + * {@code @BeforeEach} methods must have a {@code void} return type, + * must not be {@code private}, and must not be {@code static}. + * They may optionally declare parameters to be resolved by * {@link org.junit.jupiter.api.extension.ParameterResolver ParameterResolvers}. - * {@code @BeforeEach} methods must not return a value. * *