diff --git a/CHANGELOG.md b/CHANGELOG.md index 2d45f20..c992ded 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,10 @@ Changelog === +Version 22.0.0 +--- +* Added new annotations: `@Blocking` and `@NonBlocking`. + Version 21.0.1 --- * Multi-Release Jar: Manifest fixed diff --git a/build.gradle b/build.gradle index 05b586b..94aaab4 100644 --- a/build.gradle +++ b/build.gradle @@ -18,7 +18,6 @@ import jetbrains.sign.GpgSignSignatoryProvider buildscript { repositories { - jcenter() maven { url "https://packages.jetbrains.team/maven/p/jcs/maven" } } dependencies { diff --git a/common/src/main/java/org/jetbrains/annotations/Blocking.java b/common/src/main/java/org/jetbrains/annotations/Blocking.java new file mode 100644 index 0000000..f575896 --- /dev/null +++ b/common/src/main/java/org/jetbrains/annotations/Blocking.java @@ -0,0 +1,20 @@ +package org.jetbrains.annotations; + +import java.lang.annotation.*; + +/** + * Indicates that the annotated method is inherently blocking and should not be executed in a non-blocking context. + *

+ * When this annotation is used on a {@code class}, all the methods declared by the annotated class are considered + * blocking. + *

+ * Apart from documentation purposes this annotation is intended to be used by static analysis tools to validate against + * probable runtime errors and element contract violations. + * + * @since 22.0.0 + */ +@Documented +@Retention(RetentionPolicy.CLASS) +@Target({ElementType.METHOD, ElementType.CONSTRUCTOR, ElementType.TYPE}) +public @interface Blocking { +} diff --git a/common/src/main/java/org/jetbrains/annotations/NonBlocking.java b/common/src/main/java/org/jetbrains/annotations/NonBlocking.java new file mode 100644 index 0000000..e64254f --- /dev/null +++ b/common/src/main/java/org/jetbrains/annotations/NonBlocking.java @@ -0,0 +1,20 @@ +package org.jetbrains.annotations; + +import java.lang.annotation.*; + +/** + * Indicates that the annotated method is inherently non-blocking and can be executed in a non-blocking context. + *

+ * When this annotation is used on a {@code class}, all the methods declared by the annotated class are considered + * non-blocking. + *

+ * Apart from documentation purposes this annotation is intended to be used by static analysis tools to validate against + * probable runtime errors and contract violations. + * + * @since 22.0.0 + */ +@Documented +@Retention(RetentionPolicy.CLASS) +@Target({ElementType.METHOD, ElementType.CONSTRUCTOR, ElementType.TYPE}) +public @interface NonBlocking { +} diff --git a/gradle.properties b/gradle.properties index 499e12f..6bf0839 100644 --- a/gradle.properties +++ b/gradle.properties @@ -14,5 +14,5 @@ # limitations under the License. # -projectVersion=21.0.1 +projectVersion=22.0.0 #JDK_5= \ No newline at end of file