[Git][java-team/intellij-annotations][master] 8 commits: Import Upstream version 17.0.0

Markus Koschany gitlab at salsa.debian.org
Sat Nov 9 22:35:40 GMT 2019



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


Commits:
a8872846 by Markus Koschany at 2019-11-09T22:25:47Z
Import Upstream version 17.0.0
- - - - -
7814838d by Markus Koschany at 2019-11-09T22:25:48Z
Import Debian changes 17.0.0-1

intellij-annotations (17.0.0-1) unstable; urgency=medium

  * New upstream version 17.0.0.
  * Declare compliance with Debian Policy 4.3.0.

- - - - -
254925fc by Markus Koschany at 2019-11-09T22:26:02Z
New upstream version 18.0.0
- - - - -
5a46eb86 by Markus Koschany at 2019-11-09T22:26:03Z
Update upstream source from tag 'upstream/18.0.0'

Update to upstream version '18.0.0'
with Debian dir be8d4344a121390e772d33facd69a13389d5cd13
- - - - -
270e452e by Markus Koschany at 2019-11-09T22:26:43Z
Switch to debhelper-compat = 12.

- - - - -
0207a6da by Markus Koschany at 2019-11-09T22:27:01Z
Declare compliance with Debian Policy 4.4.1.

- - - - -
8d36dd13 by Markus Koschany at 2019-11-09T22:31:25Z
Update version in *.poms to 18.0.0

- - - - -
974cf0d0 by Markus Koschany at 2019-11-09T22:31:58Z
Update changelog

- - - - -


16 changed files:

- + .gitignore
- + CODE_OF_CONDUCT.md
- CONTRIBUTING.md
- README.md
- build.gradle
- + common/src/main/java/org/jetbrains/annotations/ApiStatus.java
- common/src/main/java/org/jetbrains/annotations/Async.java
- + common/src/main/java/org/jetbrains/annotations/Debug.java
- debian/changelog
- − debian/compat
- debian/control
- debian/copyright
- debian/libjetbrains-annotations-java.poms
- debian/rules
- gradle.properties
- + java8/src/main/java/org/jetbrains/annotations/Range.java


Changes:

=====================================
.gitignore
=====================================
@@ -0,0 +1,3 @@
+build
+/.idea
+/.gradle
\ No newline at end of file


=====================================
CODE_OF_CONDUCT.md
=====================================
@@ -0,0 +1,4 @@
+## Code of Conduct
+
+This project and the corresponding community is governed by the [JetBrains Open Source and Community Code of Conduct](https://confluence.jetbrains.com/display/ALL/JetBrains+Open+Source+and+Community+Code+of+Conduct). Please make sure you read it. 
+


=====================================
CONTRIBUTING.md
=====================================
@@ -12,6 +12,11 @@ a new annotation highly related to an existing one
 Also update version number in the examples in README.md file.  
 
 ### Backward compatibility
-All the changes should be backward compatible i.e. you can add new annotations and new elements into existing annotation. 
+All the changes should be backward compatible i.e. you can only add new annotations and new elements into existing annotation. 
 If it's absolutely necessary to remove an annotation or its element we must firstly release a new major version where 
-the corresponding element is marked as deprecated and then remove it in one of the next major versions.        
\ No newline at end of file
+the corresponding element is marked as deprecated and then remove it in one of the next major versions.
+
+### Retention policy
+No annotation in this package should have `RUNTIME` retention policy. Only `SOURCE` and `CLASS` policy is accepted. 
+The `CLASS` policy is preferred. The `SOURCE` policy could be used in rare cases when compilation could not preserve all 
+the necessary information (e.g. `@MagicConstant` annotation).
\ No newline at end of file


=====================================
README.md
=====================================
@@ -6,10 +6,10 @@ interpreted by IDEs and static analysis tools to improve code analysis.
 
 ## Using the annotations
 The annotations are published on [Maven Central](http://repo1.maven.org/maven2/org/jetbrains/annotations/) and [JCenter](https://jcenter.bintray.com/org/jetbrains/annotations/). To add a dependency
-using gradle write the following in `build.gradle` file:
+using gradle write the following in the `build.gradle` file:
 ```
 dependencies {
-    compile 'org.jetbrains:annotations:16.0.3'
+    compileOnly 'org.jetbrains:annotations:18.0.0'
 }
 
 ```
@@ -18,12 +18,12 @@ To add a dependency using Maven write the following in `pom.xml`:
 <dependency>
   <groupId>org.jetbrains</groupId>
   <artifactId>annotations</artifactId>
-  <version>16.0.3</version>
+  <version>18.0.0</version>
 </dependency>
 ```
 
-`annotations` artifact require JDK 1.8 or higher. If your project is compiled using JDK 1.5, 1.6 or 1.7 you can use 
-`annotations-java5` artifact instead.
+`annotations` artifact requires JDK 1.8 or higher. If your project is compiled using JDK 1.5, 1.6 or 1.7 you can use 
+the `annotations-java5` artifact instead.
 
 
     


=====================================
build.gradle
=====================================
@@ -11,6 +11,7 @@ ext.projectVersion = projectVersion
 if (System.getenv('BINTRAY_USER') == null) {
     ext.projectVersion = ext.projectVersion + '-SNAPSHOT'
 }
+println "##teamcity[setParameter name='java.annotations.version' value='$projectVersion']"
 
 allprojects {
     group 'org.jetbrains'
@@ -86,7 +87,7 @@ configure([project(':java5'), project(':java8')]) {
                         licenses {
                             license {
                                 name 'The Apache Software License, Version 2.0'
-                                url 'http://www.apache.org/license/LICENSE-2.0.txt'
+                                url 'https://www.apache.org/licenses/LICENSE-2.0.txt'
                                 distribution 'repo'
                             }
                         }


=====================================
common/src/main/java/org/jetbrains/annotations/ApiStatus.java
=====================================
@@ -0,0 +1,126 @@
+// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
+package org.jetbrains.annotations;
+
+import java.lang.annotation.*;
+
+/**
+ * Set of annotations which can be used to specify status of API Element.
+ *
+ * @since 18.0.0
+ */
+public final class ApiStatus {
+  /**
+   * <p>Indicates that a public API of the annotated element (class, method or field) is not in stable state yet. It may be renamed, changed or
+   * even removed in a future version. This annotation refers to API status only, it doesn't mean that the implementation has
+   * an 'experimental' quality.</p>
+   *
+   * <p>It's safe to use an element marked with this annotation if the usage is located in the same sources codebase as the declaration. However,
+   * if the declaration belongs to an external library such usages may lead to problems when the library will be updated to another version.</p>
+   *
+   * <p>If a package is marked with this annotation, all its containing classes are considered experimental.
+   * Subpackages of this package are not affected and should be marked independently.</p>
+   *
+   * <p>If a type is marked with this annotation, all its members are considered experimental, but its inheritors are not.</p>
+   *
+   * <p>If a method is marked with this annotation, overriding methods are not considered experimental.</p>
+   */
+  @Documented
+  @Retention(RetentionPolicy.CLASS)
+  @Target({
+    ElementType.TYPE, ElementType.ANNOTATION_TYPE, ElementType.METHOD, ElementType.CONSTRUCTOR, ElementType.FIELD, ElementType.PACKAGE
+  })
+  public @interface Experimental {}
+
+  /**
+   * Indicates that the annotated element (class, method, field, etc) must not be considered as a public API. It's made visible to allow
+   * usages in other packages of the declaring module, but it must not be used outside of that module. Such elements
+   * may be renamed, changed or removed in future versions.
+   *
+   * <p>If a package is marked with this annotation, all its containing classes are considered internal.
+   * Subpackages of this package are not affected and should be marked independently.</p>
+   *
+   * <p>If a type is marked with this annotation, all its members are considered internal, but its inheritors are not.</p>
+   *
+   * <p>If a method is marked with this annotation, overriding methods are not considered internal.</p>
+   */
+  @Documented
+  @Retention(RetentionPolicy.CLASS)
+  @Target({
+    ElementType.TYPE, ElementType.ANNOTATION_TYPE, ElementType.METHOD, ElementType.CONSTRUCTOR, ElementType.FIELD, ElementType.PACKAGE
+  })
+  public @interface Internal {}
+
+  /**
+   * <p>Indicates that a public API of the annotated element (class, method or field) is subject to removal in a future version.
+   * It's a stronger variant of {@link Deprecated} annotation.</p>
+   *
+   * <p>Since many tools aren't aware of this annotation it should be used as an addition to {@code @Deprecated} annotation
+   * or {@code @deprecated} Javadoc tag only.</p>
+   */
+  @Documented
+  @Retention(RetentionPolicy.CLASS)
+  @Target({
+    ElementType.TYPE, ElementType.ANNOTATION_TYPE, ElementType.METHOD, ElementType.CONSTRUCTOR, ElementType.FIELD, ElementType.PACKAGE
+  })
+  public @interface ScheduledForRemoval {
+    /**
+     * Specifies in which version the API will be removed.
+     */
+    String inVersion() default "";
+  }
+
+  /**
+   * <p>Indicates that the annotated element firstly appeared in the specified version of the library, so the code using that element
+   * won't be compatible with older versions of the library. This information may be used by IDEs and static analysis tools.
+   * This annotation can be used instead of '@since' Javadoc tag if it's needed to keep that information in *.class files or if you need
+   * to generate them automatically.</p>
+   */
+  @Documented
+  @Retention(RetentionPolicy.CLASS)
+  @Target({
+    ElementType.TYPE, ElementType.ANNOTATION_TYPE, ElementType.METHOD, ElementType.CONSTRUCTOR, ElementType.FIELD, ElementType.PACKAGE
+  })
+  public @interface AvailableSince {
+    /**
+     * Specifies a version where the annotation API firstly appeared.
+     */
+    String value();
+  }
+
+  /**
+   * <p>Indicates that the annotated API class, interface or method <strong>must not be extended, implemented or overridden</strong>.</p>
+   *
+   * <p>API class, interface or method may not be marked {@code final} because it is extended by classes of the declaring library
+   * but it is not supposed to be extended outside the library. Instances of classes and interfaces marked with this annotation
+   * may be cast to an internal implementing class in the library code, leading to {@code ClassCastException}
+   * if a different implementation is provided by a client.</p>
+   *
+   * <p>New abstract methods may be added to such classes and interfaces in new versions of the library breaking compatibility
+   * with a client's implementations.</p>
+   */
+  @Documented
+  @Retention(RetentionPolicy.CLASS)
+  @Target({
+    ElementType.TYPE, ElementType.METHOD
+  })
+  public @interface NonExtendable { }
+
+  /**
+   * <p>Indicates that the annotated method is part of SPI (Service Provider Interface), which is intended to be
+   * <strong>only implemented or overridden</strong> but not called by clients of the declaring library.
+   * If a class or interface is marked with this annotation it means that all its methods can be only overridden.</p>
+   *
+   * <p>Although there is a standard mechanism of {@code protected} methods, it is not applicable to interface's methods.
+   * Also, API method may be made {@code public} to allow calls only from different parts of the declaring library but not outside it.</p>
+   *
+   * <p>Signatures of such methods may be changed in new versions of the library in the following steps. Firstly, a method with new signature
+   * is added to the library delegating to the old method by default. Secondly, all clients implement the new method and remove
+   * implementations of the old one. This leads to compatibility breakage with code that calls the methods directly.</p>
+   */
+  @Documented
+  @Retention(RetentionPolicy.CLASS)
+  @Target({
+    ElementType.TYPE, ElementType.METHOD
+  })
+  public @interface OverrideOnly { }
+}
\ No newline at end of file


=====================================
common/src/main/java/org/jetbrains/annotations/Async.java
=====================================
@@ -12,7 +12,7 @@ import java.lang.annotation.Target;
  *
  * @author egor
  */
-public interface Async {
+public final class Async {
 
   /**
    * Indicates that the marked method schedules async computation.
@@ -20,7 +20,7 @@ public interface Async {
    */
   @Retention(RetentionPolicy.CLASS)
   @Target({ElementType.METHOD, ElementType.CONSTRUCTOR, ElementType.PARAMETER})
-  @interface Schedule {}
+  public @interface Schedule {}
 
   /**
    * Indicates that the marked method executes async computation.
@@ -29,5 +29,5 @@ public interface Async {
    */
   @Retention(RetentionPolicy.CLASS)
   @Target({ElementType.METHOD, ElementType.CONSTRUCTOR, ElementType.PARAMETER})
-  @interface Execute {}
+  public @interface Execute {}
 }


=====================================
common/src/main/java/org/jetbrains/annotations/Debug.java
=====================================
@@ -0,0 +1,44 @@
+// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
+package org.jetbrains.annotations;
+
+import org.intellij.lang.annotations.Language;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * @since 18.0.0
+ */
+public final class Debug {
+  /**
+   * Allows to change the presentation of an object in debuggers
+   */
+  @Target(ElementType.TYPE)
+  @Retention(RetentionPolicy.CLASS)
+  public @interface Renderer {
+    /**
+     * Expression to be evaluated and used as the textual representation of the object.<br>
+     * {@code this} refers to the class instance being presented
+     */
+    @Language(value = "JAVA", prefix = "class Renderer{String $text(){return ", suffix = ";}}")
+    String text() default "";
+
+    /**
+     * Expression to be evaluated to obtain an array of object's children.<br>
+     * Usually the result is an array of elements in a collection, or an array of entries in a map.<br>
+     * {@code this} refers to the class instance being presented
+     */
+    @Language(value = "JAVA", prefix = "class Renderer{Object[] $childrenArray(){return ", suffix = ";}}")
+    String childrenArray() default "";
+
+    /**
+     * Expression to be evaluated to check if the object has any children at all.<br>
+     * This should work faster than {@link #childrenArray()} and return boolean.<br>
+     * {@code this} refers to the class instance being presented
+     */
+    @Language(value = "JAVA", prefix = "class Renderer{boolean $hasChildren(){return ", suffix = ";}}")
+    String hasChildren() default "";
+  }
+}


=====================================
debian/changelog
=====================================
@@ -1,3 +1,18 @@
+intellij-annotations (18.0.0-1) unstable; urgency=medium
+
+  * New upstream version 18.0.0.
+  * Switch to debhelper-compat = 12.
+  * Declare compliance with Debian Policy 4.4.1.
+
+ -- Markus Koschany <apo at debian.org>  Sat, 09 Nov 2019 23:31:41 +0100
+
+intellij-annotations (17.0.0-1) unstable; urgency=medium
+
+  * New upstream version 17.0.0.
+  * Declare compliance with Debian Policy 4.3.0.
+
+ -- Markus Koschany <apo at debian.org>  Sat, 09 Feb 2019 14:02:53 +0100
+
 intellij-annotations (16.0.3-1) unstable; urgency=medium
 
   * New upstream version 16.0.3.


=====================================
debian/compat deleted
=====================================
@@ -1 +0,0 @@
-11


=====================================
debian/control
=====================================
@@ -7,12 +7,12 @@ Uploaders:
  Saif Abdul Cassim <saif.15 at cse.mrt.ac.lk>,
  Andrej Shadura <andrewsh at debian.org>
 Build-Depends:
- debhelper (>= 11),
+ debhelper-compat (= 12),
  gradle-debian-helper,
  maven-repo-helper,
  default-jdk,
  default-jdk-doc
-Standards-Version: 4.2.1
+Standards-Version: 4.4.1
 Vcs-Git: https://salsa.debian.org/java-team/intellij-annotations.git
 Vcs-Browser: https://salsa.debian.org/java-team/intellij-annotations
 Homepage: https://github.com/JetBrains/java-annotations/


=====================================
debian/copyright
=====================================
@@ -5,15 +5,15 @@ Files-Excluded:
  *.jar
 
 Files: *
-Copyright: 2000-2018, JetBrains s.r.o
+Copyright: 2000-2019, JetBrains s.r.o
            2006,      Sascha Weinreuter
 License: Apache-2.0
 
 Files: debian/*
 Copyright:
- 2016, Markus Koschany <apo at debian.org>
- 2018, Saif Abdul Cassim <saif.15 at cse.mrt.ac.lk>
- 2018, Andrej Shadura <andrewsh at debian.org>
+ 2016-2019, Markus Koschany <apo at debian.org>
+ 2018,      Saif Abdul Cassim <saif.15 at cse.mrt.ac.lk>
+ 2018,      Andrej Shadura <andrewsh at debian.org>
 License: Apache-2.0
 
 License: Apache-2.0


=====================================
debian/libjetbrains-annotations-java.poms
=====================================
@@ -1,2 +1,2 @@
-common/build/debian/common.pom --artifact=common/build/libs/common-16.0.3-SNAPSHOT.jar --java-lib --usj-name=org.jetbrains.annotations-common
-java8/build/debian/annotations.pom --artifact=java8/build/libs/annotations-16.0.3-SNAPSHOT.jar --java-lib --usj-name=org.jetbrains.annotations-java8
+common/build/debian/common.pom --artifact=common/build/libs/common-18.0.0-SNAPSHOT.jar --java-lib --usj-name=org.jetbrains.annotations-common
+java8/build/debian/annotations.pom --artifact=java8/build/libs/annotations-18.0.0-SNAPSHOT.jar --java-lib --usj-name=org.jetbrains.annotations-java8


=====================================
debian/rules
=====================================
@@ -20,8 +20,3 @@ override_mh_install:
 		-e 's,libjetbrains-annotations,libintellij-annotations,g' \
 		debian/*/usr/share/maven-repo/com/intellij/*/*/*pom
 
-get-orig-source:
-	uscan --verbose --repack --compression xz --force-download --download-current-version
-
-get-orig-pom:
-	wget --user-agent="" -O debian/pom.xml $(MAVEN_REPO)/$(VERSION)/annotations-$(VERSION).pom


=====================================
gradle.properties
=====================================
@@ -1 +1 @@
-projectVersion=16.0.3
\ No newline at end of file
+projectVersion=18.0.0
\ No newline at end of file


=====================================
java8/src/main/java/org/jetbrains/annotations/Range.java
=====================================
@@ -0,0 +1,29 @@
+package org.jetbrains.annotations;
+
+import java.lang.annotation.*;
+
+/**
+ * An annotation which allows to specify for integral type (byte, char, short, int, long) an allowed values range.
+ * Applying this annotation to other types is not correct.
+ * <p>
+ * Example:
+ * <pre>{@code public @Range(from = 0, to = Integer.MAX_VALUE) int length() { 
+ *   return this.length; // returns a non-negative integer
+ * }}</pre>
+ *
+ * @since 17.0.0
+ */
+ at Documented
+ at Retention(RetentionPolicy.CLASS)
+ at Target({ElementType.TYPE_USE})
+public @interface Range {
+  /**
+   * @return minimal allowed value (inclusive)
+   */
+  long from();
+
+  /**
+   * @return maximal allowed value (inclusive)
+   */
+  long to();
+}
\ No newline at end of file



View it on GitLab: https://salsa.debian.org/java-team/intellij-annotations/compare/2c754b452286fb8d8b5ae88ab03e4f5b701e2ed1...974cf0d06a9c4c1df8e5791676042e94d547a44c

-- 
View it on GitLab: https://salsa.debian.org/java-team/intellij-annotations/compare/2c754b452286fb8d8b5ae88ab03e4f5b701e2ed1...974cf0d06a9c4c1df8e5791676042e94d547a44c
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/20191109/54496942/attachment.html>


More information about the pkg-java-commits mailing list