Skip to content

Commit d4b23e8

Browse files
dovchinnikovchashnikov
authored andcommitted
add ApiStatus.Obsolete annotation
1 parent 30daf99 commit d4b23e8

File tree

2 files changed

+20
-1
lines changed

2 files changed

+20
-1
lines changed

common/src/main/java/org/jetbrains/annotations/ApiStatus.java

+19
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,25 @@ private ApiStatus() {
7272
})
7373
public @interface Internal {}
7474

75+
/**
76+
* <p>Indicates that a public API of the annotated element (class, method or field) is subject to deprecation in a future version.
77+
* It's a weaker variant of {@link Deprecated} annotation.
78+
* The annotated API is not supposed to be used in the new code because a better API exists,
79+
* but it's permitted to postpone the migration of the existing code, therefore the usage is not considered a warning.
80+
* </p>
81+
*/
82+
@Documented
83+
@Retention(RetentionPolicy.CLASS)
84+
@Target({
85+
ElementType.TYPE, ElementType.ANNOTATION_TYPE, ElementType.METHOD, ElementType.CONSTRUCTOR, ElementType.FIELD, ElementType.PACKAGE
86+
})
87+
public @interface Obsolete {
88+
/**
89+
* Specifies in which version the API became obsolete.
90+
*/
91+
String since() default "";
92+
}
93+
7594
/**
7695
* <p>Indicates that a public API of the annotated element (class, method or field) is subject to removal in a future version.
7796
* It's a stronger variant of {@link Deprecated} annotation.</p>

gradle.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@
1414
# limitations under the License.
1515
#
1616

17-
projectVersion=23.0.1
17+
projectVersion=23.1.0
1818
#JDK_5=<path-to-older-java-version>

0 commit comments

Comments
 (0)