From 9335b314da30d5ba6c9e2711a65e92cc39d5de0d Mon Sep 17 00:00:00 2001 From: armanovxx Date: Sat, 24 Jun 2023 14:32:46 +0200 Subject: [PATCH] add @API to annotation classes --- .../src/main/java/org/junit/jupiter/api/AutoClose.java | 3 +++ .../src/main/java/org/junit/jupiter/api/AutoCloseUtils.java | 3 +++ .../org/junit/jupiter/api/extension/AutoCloseExtension.java | 3 +++ 3 files changed, 9 insertions(+) diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/AutoClose.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/AutoClose.java index dee9a4966332..38bf4127d4e8 100644 --- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/AutoClose.java +++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/AutoClose.java @@ -1,5 +1,7 @@ package org.junit.jupiter.api; +import org.apiguardian.api.API; + import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; @@ -30,6 +32,7 @@ */ @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.FIELD) +@API(status = API.Status.EXPERIMENTAL,since = "5.9") public @interface AutoClose { /** * Specifies the name of the method to invoke for closing the resource. diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/AutoCloseUtils.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/AutoCloseUtils.java index b873ba2cd68d..5ae92abc0e17 100644 --- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/AutoCloseUtils.java +++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/AutoCloseUtils.java @@ -1,4 +1,5 @@ package org.junit.jupiter.api; +import org.apiguardian.api.API; import org.junit.jupiter.api.AutoClose; import java.io.Closeable; @@ -33,6 +34,8 @@ * @see java.lang.reflect.Field * @see java.lang.reflect.Method */ +@API(status = API.Status.EXPERIMENTAL,since = "5.9") + public class AutoCloseUtils { private AutoCloseUtils() { // Private constructor to prevent instantiation diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/AutoCloseExtension.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/AutoCloseExtension.java index b1d20efe1417..dbee02cf6d37 100644 --- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/AutoCloseExtension.java +++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/AutoCloseExtension.java @@ -1,4 +1,5 @@ package org.junit.jupiter.api.extension; +import org.apiguardian.api.API; import org.junit.jupiter.api.AutoCloseUtils; import org.junit.jupiter.api.extension.AfterEachCallback; import org.junit.jupiter.api.extension.ExtensionContext; @@ -23,6 +24,8 @@ * @see org.junit.jupiter.api.AutoClose * @see AutoCloseUtils#closeResources(Object) */ +@API(status = API.Status.EXPERIMENTAL,since = "5.9") + public class AutoCloseExtension implements AfterEachCallback { /** * Invoked after each test execution to close the annotated resources within the test instance.