googleapis / googleapis/google-cloud-java

[sdk-platform-java] Stop using javax.annotations.Nullable from com.google.code.findbugs:jsr305

Offen
#12,477 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
priority: p2 type: feature request
Vorherrschende Sprache
Java
Sterne
2.1k
Forks
1.2k
Ø Merge
1 T. 23 Std.
Gemergte PRs (30 T.)
154

Beschreibung

A child issue of googleapis/google-cloud-java#12487. We use the following annotations from Findbugs's jsr305.

- javax.annotation.Nonnull (RetentionPolicy.RUNTIME) This comes from com.google.code.findbugs:jsr305:jar:3.0.2
- javax.annotation.Nullable (RetentionPolicy.RUNTIME) This comes from com.google.code.findbugs:jsr305:jar:3.0.2

Related:

- Guava's https://github.com/google/guava/issues/2960 (still open)
- "_F. JAVA TECHNOLOGY RESTRICTIONS. You may not create, modify, or change the behavior of, or authorize your licensees to create, modify, or change the behavior of, classes, interfaces, or subpackages that are in any way identified as "java", "javax", "sun", “oracle” or similar convention as specified by Oracle in any naming convention designation._" Therefore, the Findbugs project, which has been discontinued, cannot release `javax.annotation.Nonnull` or `javax.annotation.Nullable` any more. We should stop using the annotations.
- Guava uses checkerframework's Nullable: https://github.com/google/guava/blob/master/guava/src/com/google/common/cache/LocalCache.java#L91
- Guava still uses `javax.annotation.Nonnull` https://github.com/google/guava/blob/b567b26e2bd6ea679b8cf69711cc8a41ecf219c4/guava/src/com/google/common/cache/ElementTypesAreNonnullByDefault.java#L28
- Findbugs project has been forked as the Spotbugs project "FindBugs is now SpotBugs" https://github.com/findbugsproject/findbugs.

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.