Skip to content

Commit 509921a

Browse files
author
Vincent Potucek
committed
Enable LexicographicalAnnotationListing
1 parent 553458e commit 509921a

File tree

124 files changed

+307
-307
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

124 files changed

+307
-307
lines changed

gradle/plugins/common/src/main/kotlin/junitbuild.java-nullability-conventions.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ tasks.withType<JavaCompile>().configureEach {
4242
"FormatStringConcatenation",
4343
"IdentityConversion",
4444
"LexicographicalAnnotationAttributeListing", // We don`t want to use this: https://github.com/junit-team/junit-framework/pull/5043#pullrequestreview-3330615838
45-
"LexicographicalAnnotationListing",
4645
"MissingTestCall",
4746
"NestedOptionals",
4847
"NonStaticImport",
@@ -52,6 +51,7 @@ tasks.withType<JavaCompile>().configureEach {
5251
"TimeZoneUsage",
5352
)
5453
error(
54+
"LexicographicalAnnotationListing",
5555
"PackageLocation",
5656
"RedundantStringConversion",
5757
"RedundantStringEscape",

junit-jupiter-api/src/main/java/org/junit/jupiter/api/AfterAll.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,9 @@
9191
* @see TestFactory
9292
* @see TestInstance
9393
*/
94-
@Target({ ElementType.ANNOTATION_TYPE, ElementType.METHOD })
95-
@Retention(RetentionPolicy.RUNTIME)
96-
@Documented
9794
@API(status = STABLE, since = "5.0")
95+
@Documented
96+
@Retention(RetentionPolicy.RUNTIME)
97+
@Target({ ElementType.ANNOTATION_TYPE, ElementType.METHOD })
9898
public @interface AfterAll {
9999
}

junit-jupiter-api/src/main/java/org/junit/jupiter/api/AfterEach.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,9 @@
8484
* @see TestFactory
8585
* @see TestTemplate
8686
*/
87-
@Target({ ElementType.ANNOTATION_TYPE, ElementType.METHOD })
88-
@Retention(RetentionPolicy.RUNTIME)
89-
@Documented
9087
@API(status = STABLE, since = "5.0")
88+
@Documented
89+
@Retention(RetentionPolicy.RUNTIME)
90+
@Target({ ElementType.ANNOTATION_TYPE, ElementType.METHOD })
9191
public @interface AfterEach {
9292
}

junit-jupiter-api/src/main/java/org/junit/jupiter/api/Assertions.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3718,8 +3718,8 @@ public static <T> T assertInstanceOf(Class<T> expectedType, @Nullable Object act
37183718
*
37193719
* @since 5.8
37203720
*/
3721-
@Contract("_, null, _ -> fail")
37223721
@API(status = STABLE, since = "5.10")
3722+
@Contract("_, null, _ -> fail")
37233723
public static <T> T assertInstanceOf(Class<T> expectedType, @Nullable Object actualValue,
37243724
Supplier<@Nullable String> messageSupplier) {
37253725
return AssertInstanceOf.assertInstanceOf(expectedType, actualValue, messageSupplier);

junit-jupiter-api/src/main/java/org/junit/jupiter/api/Assumptions.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -284,8 +284,8 @@ public static void assumingThat(boolean assumption, Executable executable) {
284284
* @throws TestAbortedException always
285285
* @since 5.9
286286
*/
287-
@Contract(" -> fail")
288287
@API(status = STABLE, since = "5.9")
288+
@Contract(" -> fail")
289289
@SuppressWarnings("TypeParameterUnusedInFormals")
290290
public static <V> V abort() {
291291
throw new TestAbortedException();
@@ -309,8 +309,8 @@ public static <V> V abort() {
309309
* @throws TestAbortedException always
310310
* @since 5.9
311311
*/
312-
@Contract("_ -> fail")
313312
@API(status = STABLE, since = "5.9")
313+
@Contract("_ -> fail")
314314
@SuppressWarnings("TypeParameterUnusedInFormals")
315315
public static <V> V abort(String message) {
316316
throw new TestAbortedException(message);
@@ -327,8 +327,8 @@ public static <V> V abort(String message) {
327327
* @throws TestAbortedException always
328328
* @since 5.9
329329
*/
330-
@Contract("_ -> fail")
331330
@API(status = STABLE, since = "5.9")
331+
@Contract("_ -> fail")
332332
@SuppressWarnings("TypeParameterUnusedInFormals")
333333
public static <V> V abort(Supplier<String> messageSupplier) {
334334
throw new TestAbortedException(messageSupplier.get());

junit-jupiter-api/src/main/java/org/junit/jupiter/api/AutoClose.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,10 @@
7575
*
7676
* @since 5.11
7777
*/
78-
@Target({ ElementType.ANNOTATION_TYPE, ElementType.FIELD })
79-
@Retention(RetentionPolicy.RUNTIME)
80-
@Documented
8178
@API(status = MAINTAINED, since = "5.13.3")
79+
@Documented
80+
@Retention(RetentionPolicy.RUNTIME)
81+
@Target({ ElementType.ANNOTATION_TYPE, ElementType.FIELD })
8282
public @interface AutoClose {
8383

8484
/**

junit-jupiter-api/src/main/java/org/junit/jupiter/api/BeforeAll.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,9 @@
9191
* @see TestFactory
9292
* @see TestInstance
9393
*/
94-
@Target({ ElementType.ANNOTATION_TYPE, ElementType.METHOD })
95-
@Retention(RetentionPolicy.RUNTIME)
96-
@Documented
9794
@API(status = STABLE, since = "5.0")
95+
@Documented
96+
@Retention(RetentionPolicy.RUNTIME)
97+
@Target({ ElementType.ANNOTATION_TYPE, ElementType.METHOD })
9898
public @interface BeforeAll {
9999
}

junit-jupiter-api/src/main/java/org/junit/jupiter/api/BeforeEach.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,9 @@
8484
* @see TestFactory
8585
* @see TestTemplate
8686
*/
87-
@Target({ ElementType.ANNOTATION_TYPE, ElementType.METHOD })
88-
@Retention(RetentionPolicy.RUNTIME)
89-
@Documented
9087
@API(status = STABLE, since = "5.0")
88+
@Documented
89+
@Retention(RetentionPolicy.RUNTIME)
90+
@Target({ ElementType.ANNOTATION_TYPE, ElementType.METHOD })
9191
public @interface BeforeEach {
9292
}

junit-jupiter-api/src/main/java/org/junit/jupiter/api/ClassTemplate.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,11 @@
6262
* @see BeforeClassTemplateInvocationCallback
6363
* @see AfterClassTemplateInvocationCallback
6464
*/
65-
@Target({ ElementType.ANNOTATION_TYPE, ElementType.TYPE })
66-
@Retention(RetentionPolicy.RUNTIME)
65+
@API(status = EXPERIMENTAL, since = "6.0")
6766
@Documented
6867
@Inherited
69-
@API(status = EXPERIMENTAL, since = "6.0")
68+
@Retention(RetentionPolicy.RUNTIME)
69+
@Target({ ElementType.ANNOTATION_TYPE, ElementType.TYPE })
7070
@Testable
7171
public @interface ClassTemplate {
7272
}

junit-jupiter-api/src/main/java/org/junit/jupiter/api/Disabled.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,10 @@
5858
* @see org.junit.jupiter.api.condition.DisabledInNativeImage
5959
* @see org.junit.jupiter.api.extension.ExecutionCondition
6060
*/
61-
@Target({ ElementType.TYPE, ElementType.METHOD })
62-
@Retention(RetentionPolicy.RUNTIME)
63-
@Documented
6461
@API(status = STABLE, since = "5.0")
62+
@Documented
63+
@Retention(RetentionPolicy.RUNTIME)
64+
@Target({ ElementType.TYPE, ElementType.METHOD })
6565
public @interface Disabled {
6666

6767
/**

0 commit comments

Comments
 (0)