[Git][java-team/intellij-annotations][master] 4 commits: New upstream version 23.0.0

Markus Koschany (@apo) gitlab at salsa.debian.org
Mon Nov 15 10:45:56 GMT 2021



Markus Koschany pushed to branch master at Debian Java Maintainers / intellij-annotations


Commits:
6128956e by Markus Koschany at 2021-11-15T11:40:45+01:00
New upstream version 23.0.0
- - - - -
27bb2349 by Markus Koschany at 2021-11-15T11:40:45+01:00
Update upstream source from tag 'upstream/23.0.0'

Update to upstream version '23.0.0'
with Debian dir 05fd192271f7c4d3ef9cbd25b0d5ed5cde28a7f4
- - - - -
816eaa1d by Markus Koschany at 2021-11-15T11:41:54+01:00
Update to version 23.0.0

- - - - -
c4155206 by Markus Koschany at 2021-11-15T11:42:19+01:00
Update changelog

- - - - -


10 changed files:

- CHANGELOG.md
- README.md
- common/src/main/java/org/intellij/lang/annotations/MagicConstant.java
- common/src/main/java/org/jetbrains/annotations/Blocking.java
- common/src/main/java/org/jetbrains/annotations/NonBlocking.java
- debian/changelog
- debian/libjetbrains-annotations-java.poms
- gradle.properties
- + java8/src/main/java/org/jetbrains/annotations/BlockingExecutor.java
- + java8/src/main/java/org/jetbrains/annotations/NonBlockingExecutor.java


Changes:

=====================================
CHANGELOG.md
=====================================
@@ -1,6 +1,10 @@
 Changelog
 ===
 
+Version 23.0.0
+---
+* Added new annotations: `@BlockingExecutor` and `@NonBlockingExecutor`.
+
 Version 22.0.0
 ---
 * Added new annotations: `@Blocking` and `@NonBlocking`.


=====================================
README.md
=====================================
@@ -16,7 +16,7 @@ The annotations are published on [Maven Central](https://repo1.maven.org/maven2/
 using gradle write the following in the `build.gradle` file:
 ```
 dependencies {
-    compileOnly 'org.jetbrains:annotations:21.0.1'
+    compileOnly 'org.jetbrains:annotations:23.0.0'
 }
 
 ```
@@ -25,7 +25,7 @@ To add a dependency using Maven, write the following in `pom.xml`:
 <dependency>
   <groupId>org.jetbrains</groupId>
   <artifactId>annotations</artifactId>
-  <version>21.0.1</version>
+  <version>23.0.0</version>
   <scope>provided</scope>
 </dependency>
 ```


=====================================
common/src/main/java/org/intellij/lang/annotations/MagicConstant.java
=====================================
@@ -115,7 +115,7 @@ public @interface MagicConstant {
   long[] flags() default {};
 
   /**
-   * @return allowed values which are defined in the specified class public static final constants.
+   * @return allowed values which are defined in the specified class static final constants.
    *
    * E.g.
    * <pre>
@@ -129,7 +129,7 @@ public @interface MagicConstant {
   Class<?> valuesFromClass() default void.class;
 
   /**
-   * @return allowed int flags which are defined in the specified class public static final constants.
+   * @return allowed int flags which are defined in the specified class static final constants.
    * The difference from the {@link #valuesFromClass()} is that flags are allowed to be combined (via plus:+ or bitwise OR: |) whereas values aren't.
    * The literals "0" and "-1" are also allowed to denote absence and presense of all flags respectively.
    *


=====================================
common/src/main/java/org/jetbrains/annotations/Blocking.java
=====================================
@@ -1,3 +1,19 @@
+/*
+ * Copyright 2000-2021 JetBrains s.r.o.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 package org.jetbrains.annotations;
 
 import java.lang.annotation.*;


=====================================
common/src/main/java/org/jetbrains/annotations/NonBlocking.java
=====================================
@@ -1,3 +1,19 @@
+/*
+ * Copyright 2000-2021 JetBrains s.r.o.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 package org.jetbrains.annotations;
 
 import java.lang.annotation.*;


=====================================
debian/changelog
=====================================
@@ -1,3 +1,9 @@
+intellij-annotations (23.0.0-1) unstable; urgency=medium
+
+  * New upstream version 23.0.0.
+
+ -- Markus Koschany <apo at debian.org>  Mon, 15 Nov 2021 11:42:03 +0100
+
 intellij-annotations (22.0.0-1) unstable; urgency=medium
 
   * New upstream version 22.0.0.


=====================================
debian/libjetbrains-annotations-java.poms
=====================================
@@ -1,3 +1,3 @@
-common/build/debian/common.pom --artifact=common/build/libs/common-22.0.0-SNAPSHOT.jar --java-lib --usj-name=org.jetbrains.annotations-common
-java8/build/debian/annotations.pom --artifact=java8/build/libs/annotations-22.0.0-SNAPSHOT.jar --java-lib --usj-name=org.jetbrains.annotations-java8
-module-info/build/debian/module-info.pom --artifact=module-info/build/libs/module-info-22.0.0-SNAPSHOT.jar --java-lib --usj-name=org.jetbrains.annotations-module-info
+common/build/debian/common.pom --artifact=common/build/libs/common-23.0.0-SNAPSHOT.jar --java-lib --usj-name=org.jetbrains.annotations-common
+java8/build/debian/annotations.pom --artifact=java8/build/libs/annotations-23.0.0-SNAPSHOT.jar --java-lib --usj-name=org.jetbrains.annotations-java8
+module-info/build/debian/module-info.pom --artifact=module-info/build/libs/module-info-23.0.0-SNAPSHOT.jar --java-lib --usj-name=org.jetbrains.annotations-module-info


=====================================
gradle.properties
=====================================
@@ -14,5 +14,5 @@
 # limitations under the License.
 #
 
-projectVersion=22.0.0
+projectVersion=23.0.0
 #JDK_5=<path-to-older-java-version>
\ No newline at end of file


=====================================
java8/src/main/java/org/jetbrains/annotations/BlockingExecutor.java
=====================================
@@ -0,0 +1,68 @@
+/*
+ * Copyright 2000-2021 JetBrains s.r.o.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.jetbrains.annotations;
+
+import java.lang.annotation.*;
+
+/**
+ * Indicates that the annotated executor (CoroutineContext, Scheduler)
+ * allows blocking methods execution.
+ * <p>
+ * If a given executor does not allow blocking calls, {@link NonBlockingExecutor} should be used.
+ *
+ * <p>
+ * Example 1 (Kotlin coroutines):
+ * <pre><code>
+ *  class BlockingExampleService {
+ *      val dispatcher: @BlockingExecutor CoroutineContext
+ *          get() { ... }
+ *
+ *      suspend fun foo() {
+ *          val result = withContext(dispatcher) {
+ *              blockingBuzz() // no IDE warning
+ *          }
+ *      }
+ *
+ *      @Blocking fun blockingBuzz() { ... }
+ *  }
+ * </code></pre>
+ *
+ * <p>
+ * Example 2 (Java with Reactor framework):
+ * <pre><code>
+ * class BlockingExampleService {
+ *     private static final @BlockingExecutor Scheduler blockingScheduler =
+ *             Schedulers.newBoundedElastic(4, 10, "executor");
+ *
+ *     public Flux<String> foo(Flux<String> urls) {
+ *         return urls.publishOn(blockingScheduler)
+ *                 .map(url -> blockingBuzz(url));  // no IDE warning
+ *     }
+ *
+ *     @Blocking
+ *     private String blockingBuzz(String url) { ... }
+ * }
+ * </code></pre>
+ *
+ * @see Blocking
+ * @see NonBlocking
+ */
+ at Documented
+ at Retention(RetentionPolicy.CLASS)
+ at Target({ElementType.TYPE, ElementType.TYPE_USE})
+public @interface BlockingExecutor {
+}


=====================================
java8/src/main/java/org/jetbrains/annotations/NonBlockingExecutor.java
=====================================
@@ -0,0 +1,68 @@
+/*
+ * Copyright 2000-2021 JetBrains s.r.o.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.jetbrains.annotations;
+
+import java.lang.annotation.*;
+
+/**
+ * Indicates that the annotated executor (CoroutineContext, Scheduler)
+ * does not allow blocking methods execution.
+ *
+ * <p>
+ * If a given executor allows blocking calls, {@link BlockingExecutor} should be used.
+ *
+ * <p>
+ * Example 1 (Kotlin coroutines):
+ * <pre><code>
+ *  class NonBlockingExampleService {
+ *      val dispatcher: @NonBlockingExecutor CoroutineContext
+ *          get() { ... }
+ *
+ *      suspend fun foo() {
+ *          val result = withContext(dispatcher) {
+ *              blockingBuzz() // IDE warning: `Possibly blocking call in non-blocking context`
+ *          }
+ *      }
+ *
+ *      @Blocking fun blockingBuzz() { ... }
+ *  }
+ * </code></pre>
+ *
+ * <p>
+ * Example 2 (Java with Reactor framework):
+ * <pre><code>
+ *  class NonBlockingExampleService {
+ *      private static final @NonBlockingExecutor Scheduler operationsScheduler =
+ *              Schedulers.newParallel("parallel");
+ *
+ *      public Flux<String> foo(Flux<String> urls) {
+ *          return urls.publishOn(operationsScheduler)
+ *                  .filter(url -> blockingBuzz(url) != null);  // IDE warning: `Possibly blocking call in non-blocking context`
+ *      }
+ *
+ *      @Blocking
+ *      private String blockingBuzz(String url) { ... }
+ *  }
+ * </code></pre>
+ *  @see Blocking
+ *  @see NonBlocking
+ */
+ at Documented
+ at Retention(RetentionPolicy.CLASS)
+ at Target({ElementType.TYPE, ElementType.TYPE_USE})
+public @interface NonBlockingExecutor {
+}



View it on GitLab: https://salsa.debian.org/java-team/intellij-annotations/-/compare/b541307433667105271bd6c045b1e5814b129853...c41552069359ff1a80903f66954ce9ea480e5133

-- 
View it on GitLab: https://salsa.debian.org/java-team/intellij-annotations/-/compare/b541307433667105271bd6c045b1e5814b129853...c41552069359ff1a80903f66954ce9ea480e5133
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-java-commits/attachments/20211115/68adbfa2/attachment.htm>


More information about the pkg-java-commits mailing list