From 4f09caf5053b1f716ac48af624553b04ed8d7e6c Mon Sep 17 00:00:00 2001 From: Yuriy Artamonov Date: Wed, 11 Aug 2021 14:43:31 +0300 Subject: [PATCH 1/3] Remove jcenter() from build scripts --- build.gradle | 1 - 1 file changed, 1 deletion(-) 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 { From 19809f329d96148651fa6825cc54e4453f5a8537 Mon Sep 17 00:00:00 2001 From: Yuriy Artamonov Date: Wed, 11 Aug 2021 15:22:35 +0300 Subject: [PATCH 2/3] Introduce @Blocking and @NonBlocking --- .../org/jetbrains/annotations/Blocking.java | 20 +++++++++++++++++++ .../jetbrains/annotations/NonBlocking.java | 20 +++++++++++++++++++ gradle.properties | 2 +- 3 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 common/src/main/java/org/jetbrains/annotations/Blocking.java create mode 100644 common/src/main/java/org/jetbrains/annotations/NonBlocking.java 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 From 0ad8455a508c171de40e198e665145f1b1bd3596 Mon Sep 17 00:00:00 2001 From: Yuriy Artamonov Date: Thu, 12 Aug 2021 10:43:21 +0300 Subject: [PATCH 3/3] Update changelog --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) 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