Skip to content

Commit

Permalink
Remove dependency on JSR-305.
Browse files Browse the repository at this point in the history
(Or rather, demote it to a test-only dependency for `guava-testlib` only.)

Fixes #2960

This is the next step toward [using JSpecify in Guava](jspecify/jspecify#239 (comment)).

RELNOTES=n/a
PiperOrigin-RevId: 708694414
  • Loading branch information
cpovirk authored and Google Java Core Libraries committed Dec 22, 2024
1 parent d997ad9 commit 04bf030
Show file tree
Hide file tree
Showing 22 changed files with 6 additions and 412 deletions.
2 changes: 2 additions & 0 deletions android/guava-testlib/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
<dependency>
<groupId>com.google.code.findbugs</groupId>
<artifactId>jsr305</artifactId>
<version>3.0.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.checkerframework</groupId>
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

4 changes: 0 additions & 4 deletions android/guava-tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,6 @@
<groupId>org.jspecify</groupId>
<artifactId>jspecify</artifactId>
</dependency>
<dependency>
<groupId>com.google.code.findbugs</groupId>
<artifactId>jsr305</artifactId>
</dependency>
<dependency>
<groupId>org.checkerframework</groupId>
<artifactId>checker-qual</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import static com.google.common.truth.Truth.assertThat;
import static org.junit.Assert.assertThrows;

import com.google.errorprone.annotations.concurrent.GuardedBy;
import java.lang.reflect.Method;
import java.net.URLClassLoader;
import java.util.HashMap;
Expand All @@ -27,7 +28,6 @@
import java.util.concurrent.Executor;
import java.util.concurrent.Future;
import java.util.concurrent.TimeUnit;
import javax.annotation.concurrent.GuardedBy;
import junit.framework.TestCase;
import org.jspecify.annotations.NullUnmarked;

Expand Down
3 changes: 0 additions & 3 deletions android/guava/javadoc-link/jsr305/package-list

This file was deleted.

9 changes: 0 additions & 9 deletions android/guava/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,6 @@
<groupId>org.jspecify</groupId>
<artifactId>jspecify</artifactId>
</dependency>
<dependency>
<groupId>com.google.code.findbugs</groupId>
<artifactId>jsr305</artifactId>
</dependency>
<dependency>
<groupId>org.checkerframework</groupId>
<artifactId>checker-qual</artifactId>
Expand Down Expand Up @@ -161,11 +157,6 @@
<detectJavaApiLink>false</detectJavaApiLink>
<offlineLinks>
<!-- We need local copies of some of these for 2 reasons: a User-Agent problem (https://stackoverflow.com/a/47891403/28465) and an SSL problem (https://issues.apache.org/jira/browse/MJAVADOC-507). If we choose to work around the User-Agent problem, we can go back to <links>, sidestepping the SSL problem. -->
<!-- Even after we stop using JSR305 annotations in our own code, we'll want this link so that NullPointerTester's docs can link to @CheckForNull and friends... at least once we start using this config for guava-testlib. -->
<offlineLink>
<url>https://static.javadoc.io/com.google.code.findbugs/jsr305/3.0.1/</url>
<location>${project.basedir}/javadoc-link/jsr305</location>
</offlineLink>
<offlineLink>
<url>https://static.javadoc.io/com.google.j2objc/j2objc-annotations/1.1/</url>
<location>${project.basedir}/javadoc-link/j2objc-annotations</location>
Expand Down
6 changes: 0 additions & 6 deletions android/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
<test.include>%regex[.*.class]</test.include>
<truth.version>1.4.4</truth.version>
<jspecify.version>1.0.0</jspecify.version>
<jsr305.version>3.0.2</jsr305.version>
<checker.version>3.43.0</checker.version>
<errorprone.version>2.36.0</errorprone.version>
<j2objc.version>3.0.0</j2objc.version>
Expand Down Expand Up @@ -423,11 +422,6 @@
<artifactId>jspecify</artifactId>
<version>${jspecify.version}</version>
</dependency>
<dependency>
<groupId>com.google.code.findbugs</groupId>
<artifactId>jsr305</artifactId>
<version>${jsr305.version}</version>
</dependency>
<dependency>
<groupId>org.checkerframework</groupId>
<artifactId>checker-qual</artifactId>
Expand Down
2 changes: 2 additions & 0 deletions guava-testlib/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
<dependency>
<groupId>com.google.code.findbugs</groupId>
<artifactId>jsr305</artifactId>
<version>3.0.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.checkerframework</groupId>
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 04bf030

Please sign in to comment.