Skip to content

Commit 1b15b40

Browse files
cpovirkGoogle Java Core Libraries
authored andcommitted
Make our versions of @IgnoreJRERequirement support FIELD.
I can't remember offhand if I wanted that support before. Maybe? But it became possible way back in mojohaus/animal-sniffer#212. I guess this qualifies as the "nightmare scenario" for having our own versions of the annotation (#3649, #3652) :) It hardly matters. RELNOTES=n/a PiperOrigin-RevId: 778575641
1 parent 8923748 commit 1b15b40

File tree

24 files changed

+48
-24
lines changed

24 files changed

+48
-24
lines changed

android/guava-testlib/src/com/google/common/collect/testing/IgnoreJRERequirement.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
package com.google.common.collect.testing;
1616

1717
import static java.lang.annotation.ElementType.CONSTRUCTOR;
18+
import static java.lang.annotation.ElementType.FIELD;
1819
import static java.lang.annotation.ElementType.METHOD;
1920
import static java.lang.annotation.ElementType.TYPE;
2021

@@ -26,6 +27,6 @@
2627
*
2728
* <p>Each package's copy of this annotation needs to be listed in our {@code pom.xml}.
2829
*/
29-
@Target({METHOD, CONSTRUCTOR, TYPE})
30+
@Target({METHOD, CONSTRUCTOR, TYPE, FIELD})
3031
@NullMarked
3132
@interface IgnoreJRERequirement {}

android/guava-testlib/src/com/google/common/collect/testing/testers/IgnoreJRERequirement.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
package com.google.common.collect.testing.testers;
1616

1717
import static java.lang.annotation.ElementType.CONSTRUCTOR;
18+
import static java.lang.annotation.ElementType.FIELD;
1819
import static java.lang.annotation.ElementType.METHOD;
1920
import static java.lang.annotation.ElementType.TYPE;
2021

@@ -26,6 +27,6 @@
2627
*
2728
* <p>Each package's copy of this annotation needs to be listed in our {@code pom.xml}.
2829
*/
29-
@Target({METHOD, CONSTRUCTOR, TYPE})
30+
@Target({METHOD, CONSTRUCTOR, TYPE, FIELD})
3031
@NullMarked
3132
@interface IgnoreJRERequirement {}

android/guava-testlib/src/com/google/common/testing/IgnoreJRERequirement.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
package com.google.common.testing;
1616

1717
import static java.lang.annotation.ElementType.CONSTRUCTOR;
18+
import static java.lang.annotation.ElementType.FIELD;
1819
import static java.lang.annotation.ElementType.METHOD;
1920
import static java.lang.annotation.ElementType.TYPE;
2021

@@ -25,5 +26,5 @@
2526
*
2627
* <p>Each package's copy of this annotation needs to be listed in our {@code pom.xml}.
2728
*/
28-
@Target({METHOD, CONSTRUCTOR, TYPE})
29+
@Target({METHOD, CONSTRUCTOR, TYPE, FIELD})
2930
@interface IgnoreJRERequirement {}

android/guava/src/com/google/common/base/IgnoreJRERequirement.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
package com.google.common.base;
1616

1717
import static java.lang.annotation.ElementType.CONSTRUCTOR;
18+
import static java.lang.annotation.ElementType.FIELD;
1819
import static java.lang.annotation.ElementType.METHOD;
1920
import static java.lang.annotation.ElementType.TYPE;
2021

@@ -25,5 +26,5 @@
2526
*
2627
* <p>Each package's copy of this annotation needs to be listed in our {@code pom.xml}.
2728
*/
28-
@Target({METHOD, CONSTRUCTOR, TYPE})
29+
@Target({METHOD, CONSTRUCTOR, TYPE, FIELD})
2930
@interface IgnoreJRERequirement {}

android/guava/src/com/google/common/cache/IgnoreJRERequirement.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
package com.google.common.cache;
1616

1717
import static java.lang.annotation.ElementType.CONSTRUCTOR;
18+
import static java.lang.annotation.ElementType.FIELD;
1819
import static java.lang.annotation.ElementType.METHOD;
1920
import static java.lang.annotation.ElementType.TYPE;
2021

@@ -25,5 +26,5 @@
2526
*
2627
* <p>Each package's copy of this annotation needs to be listed in our {@code pom.xml}.
2728
*/
28-
@Target({METHOD, CONSTRUCTOR, TYPE})
29+
@Target({METHOD, CONSTRUCTOR, TYPE, FIELD})
2930
@interface IgnoreJRERequirement {}

android/guava/src/com/google/common/collect/IgnoreJRERequirement.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
package com.google.common.collect;
1616

1717
import static java.lang.annotation.ElementType.CONSTRUCTOR;
18+
import static java.lang.annotation.ElementType.FIELD;
1819
import static java.lang.annotation.ElementType.METHOD;
1920
import static java.lang.annotation.ElementType.TYPE;
2021

@@ -25,5 +26,5 @@
2526
*
2627
* <p>Each package's copy of this annotation needs to be listed in our {@code pom.xml}.
2728
*/
28-
@Target({METHOD, CONSTRUCTOR, TYPE})
29+
@Target({METHOD, CONSTRUCTOR, TYPE, FIELD})
2930
@interface IgnoreJRERequirement {}

android/guava/src/com/google/common/hash/IgnoreJRERequirement.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
package com.google.common.hash;
1616

1717
import static java.lang.annotation.ElementType.CONSTRUCTOR;
18+
import static java.lang.annotation.ElementType.FIELD;
1819
import static java.lang.annotation.ElementType.METHOD;
1920
import static java.lang.annotation.ElementType.TYPE;
2021

@@ -25,5 +26,5 @@
2526
*
2627
* <p>Each package's copy of this annotation needs to be listed in our {@code pom.xml}.
2728
*/
28-
@Target({METHOD, CONSTRUCTOR, TYPE})
29+
@Target({METHOD, CONSTRUCTOR, TYPE, FIELD})
2930
@interface IgnoreJRERequirement {}

android/guava/src/com/google/common/io/IgnoreJRERequirement.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
package com.google.common.io;
1616

1717
import static java.lang.annotation.ElementType.CONSTRUCTOR;
18+
import static java.lang.annotation.ElementType.FIELD;
1819
import static java.lang.annotation.ElementType.METHOD;
1920
import static java.lang.annotation.ElementType.TYPE;
2021

@@ -25,5 +26,5 @@
2526
*
2627
* <p>Each package's copy of this annotation needs to be listed in our {@code pom.xml}.
2728
*/
28-
@Target({METHOD, CONSTRUCTOR, TYPE})
29+
@Target({METHOD, CONSTRUCTOR, TYPE, FIELD})
2930
@interface IgnoreJRERequirement {}

android/guava/src/com/google/common/math/IgnoreJRERequirement.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
package com.google.common.math;
1616

1717
import static java.lang.annotation.ElementType.CONSTRUCTOR;
18+
import static java.lang.annotation.ElementType.FIELD;
1819
import static java.lang.annotation.ElementType.METHOD;
1920
import static java.lang.annotation.ElementType.TYPE;
2021

@@ -25,5 +26,5 @@
2526
*
2627
* <p>Each package's copy of this annotation needs to be listed in our {@code pom.xml}.
2728
*/
28-
@Target({METHOD, CONSTRUCTOR, TYPE})
29+
@Target({METHOD, CONSTRUCTOR, TYPE, FIELD})
2930
@interface IgnoreJRERequirement {}

android/guava/src/com/google/common/primitives/IgnoreJRERequirement.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
package com.google.common.primitives;
1616

1717
import static java.lang.annotation.ElementType.CONSTRUCTOR;
18+
import static java.lang.annotation.ElementType.FIELD;
1819
import static java.lang.annotation.ElementType.METHOD;
1920
import static java.lang.annotation.ElementType.TYPE;
2021

@@ -25,5 +26,5 @@
2526
*
2627
* <p>Each package's copy of this annotation needs to be listed in our {@code pom.xml}.
2728
*/
28-
@Target({METHOD, CONSTRUCTOR, TYPE})
29+
@Target({METHOD, CONSTRUCTOR, TYPE, FIELD})
2930
@interface IgnoreJRERequirement {}

0 commit comments

Comments
 (0)