diff --git a/core/pom.xml b/core/pom.xml
index 7b4a1d1f2..c3753a150 100644
--- a/core/pom.xml
+++ b/core/pom.xml
@@ -42,8 +42,8 @@
- org.checkerframework
- checker-qual
+ org.jspecify
+ jspecify
true
diff --git a/core/src/main/java/com/google/googlejavaformat/java/FormatFileCallable.java b/core/src/main/java/com/google/googlejavaformat/java/FormatFileCallable.java
index 3d68a23f3..7cec1fca8 100644
--- a/core/src/main/java/com/google/googlejavaformat/java/FormatFileCallable.java
+++ b/core/src/main/java/com/google/googlejavaformat/java/FormatFileCallable.java
@@ -20,7 +20,7 @@
import com.google.common.collect.TreeRangeSet;
import java.nio.file.Path;
import java.util.concurrent.Callable;
-import org.checkerframework.checker.nullness.qual.Nullable;
+import org.jspecify.annotations.Nullable;
/**
* Encapsulates information about a file to be formatted, including which parts of the file to
diff --git a/core/src/main/java/com/google/googlejavaformat/java/JavaInputAstVisitor.java b/core/src/main/java/com/google/googlejavaformat/java/JavaInputAstVisitor.java
index c23acbdb8..6dc82f40c 100644
--- a/core/src/main/java/com/google/googlejavaformat/java/JavaInputAstVisitor.java
+++ b/core/src/main/java/com/google/googlejavaformat/java/JavaInputAstVisitor.java
@@ -158,7 +158,7 @@
import java.util.regex.Pattern;
import java.util.stream.Stream;
import javax.lang.model.element.Name;
-import org.checkerframework.checker.nullness.qual.Nullable;
+import org.jspecify.annotations.Nullable;
/**
* An AST visitor that builds a stream of {@link Op}s to format from the given {@link
@@ -287,7 +287,7 @@ private static ImmutableSetMultimap typeAnnotations() {
ImmutableList.of(
"org.jspecify.annotations.NonNull",
"org.jspecify.annotations.Nullable",
- "org.jspecify.nullness.Nullable",
+ "org.jspecify.annotations.Nullable",
"org.checkerframework.checker.nullness.qual.NonNull",
"org.checkerframework.checker.nullness.qual.Nullable")) {
String simpleName = annotation.substring(annotation.lastIndexOf('.') + 1);
diff --git a/core/src/main/java/com/google/googlejavaformat/java/JavacTokens.java b/core/src/main/java/com/google/googlejavaformat/java/JavacTokens.java
index 690c924f1..986db3912 100644
--- a/core/src/main/java/com/google/googlejavaformat/java/JavacTokens.java
+++ b/core/src/main/java/com/google/googlejavaformat/java/JavacTokens.java
@@ -37,7 +37,7 @@
import java.util.List;
import java.util.Objects;
import java.util.Set;
-import org.checkerframework.checker.nullness.qual.Nullable;
+import org.jspecify.annotations.Nullable;
/** A wrapper around javac's lexer. */
final class JavacTokens {
diff --git a/core/src/main/java/com/google/googlejavaformat/java/StringWrapper.java b/core/src/main/java/com/google/googlejavaformat/java/StringWrapper.java
index 81714db64..6814054a2 100644
--- a/core/src/main/java/com/google/googlejavaformat/java/StringWrapper.java
+++ b/core/src/main/java/com/google/googlejavaformat/java/StringWrapper.java
@@ -61,7 +61,7 @@
import javax.tools.JavaFileObject;
import javax.tools.SimpleJavaFileObject;
import javax.tools.StandardLocation;
-import org.checkerframework.checker.nullness.qual.Nullable;
+import org.jspecify.annotations.Nullable;
/** Wraps string literals that exceed the column limit. */
public final class StringWrapper {
diff --git a/core/src/main/java/com/google/googlejavaformat/java/filer/FormattingFiler.java b/core/src/main/java/com/google/googlejavaformat/java/filer/FormattingFiler.java
index d38d84eca..ebdc8dfec 100644
--- a/core/src/main/java/com/google/googlejavaformat/java/filer/FormattingFiler.java
+++ b/core/src/main/java/com/google/googlejavaformat/java/filer/FormattingFiler.java
@@ -24,7 +24,7 @@
import javax.tools.FileObject;
import javax.tools.JavaFileManager;
import javax.tools.JavaFileObject;
-import org.checkerframework.checker.nullness.qual.Nullable;
+import org.jspecify.annotations.Nullable;
/**
* A decorating {@link Filer} implementation which formats Java source files with a {@link
diff --git a/core/src/main/java/com/google/googlejavaformat/java/filer/FormattingJavaFileObject.java b/core/src/main/java/com/google/googlejavaformat/java/filer/FormattingJavaFileObject.java
index c8ae80769..b65258b1a 100644
--- a/core/src/main/java/com/google/googlejavaformat/java/filer/FormattingJavaFileObject.java
+++ b/core/src/main/java/com/google/googlejavaformat/java/filer/FormattingJavaFileObject.java
@@ -26,7 +26,7 @@
import javax.tools.Diagnostic;
import javax.tools.ForwardingJavaFileObject;
import javax.tools.JavaFileObject;
-import org.checkerframework.checker.nullness.qual.Nullable;
+import org.jspecify.annotations.Nullable;
/** A {@link JavaFileObject} decorator which {@linkplain Formatter formats} source code. */
final class FormattingJavaFileObject extends ForwardingJavaFileObject {
diff --git a/core/src/test/resources/com/google/googlejavaformat/java/testdata/TypeAnnotations.input b/core/src/test/resources/com/google/googlejavaformat/java/testdata/TypeAnnotations.input
index ddaa8f1ad..d6483bbf2 100644
--- a/core/src/test/resources/com/google/googlejavaformat/java/testdata/TypeAnnotations.input
+++ b/core/src/test/resources/com/google/googlejavaformat/java/testdata/TypeAnnotations.input
@@ -1,4 +1,4 @@
-import org.checkerframework.checker.nullness.qual.Nullable;
+import org.jspecify.annotations.Nullable;
class TypeAnnotations {
diff --git a/core/src/test/resources/com/google/googlejavaformat/java/testdata/TypeAnnotations.output b/core/src/test/resources/com/google/googlejavaformat/java/testdata/TypeAnnotations.output
index 8dd5d4efc..6d0c3017d 100644
--- a/core/src/test/resources/com/google/googlejavaformat/java/testdata/TypeAnnotations.output
+++ b/core/src/test/resources/com/google/googlejavaformat/java/testdata/TypeAnnotations.output
@@ -1,4 +1,4 @@
-import org.checkerframework.checker.nullness.qual.Nullable;
+import org.jspecify.annotations.Nullable;
class TypeAnnotations {
diff --git a/idea_plugin/src/main/java/com/google/googlejavaformat/intellij/GoogleJavaFormatConfigurable.java b/idea_plugin/src/main/java/com/google/googlejavaformat/intellij/GoogleJavaFormatConfigurable.java
index 2f34b7471..cbb0ee10b 100644
--- a/idea_plugin/src/main/java/com/google/googlejavaformat/intellij/GoogleJavaFormatConfigurable.java
+++ b/idea_plugin/src/main/java/com/google/googlejavaformat/intellij/GoogleJavaFormatConfigurable.java
@@ -31,9 +31,9 @@
import javax.swing.JComponent;
import javax.swing.JLabel;
import javax.swing.JPanel;
-import org.checkerframework.checker.nullness.qual.Nullable;
import org.jetbrains.annotations.Nls;
import org.jetbrains.annotations.NotNull;
+import org.jspecify.annotations.Nullable;
class GoogleJavaFormatConfigurable extends BaseConfigurable implements SearchableConfigurable {
diff --git a/idea_plugin/src/main/java/com/google/googlejavaformat/intellij/GoogleJavaFormatSettings.java b/idea_plugin/src/main/java/com/google/googlejavaformat/intellij/GoogleJavaFormatSettings.java
index ee187c00d..572d9ba6d 100644
--- a/idea_plugin/src/main/java/com/google/googlejavaformat/intellij/GoogleJavaFormatSettings.java
+++ b/idea_plugin/src/main/java/com/google/googlejavaformat/intellij/GoogleJavaFormatSettings.java
@@ -21,8 +21,8 @@
import com.intellij.openapi.components.State;
import com.intellij.openapi.components.Storage;
import com.intellij.openapi.project.Project;
-import org.checkerframework.checker.nullness.qual.Nullable;
import org.jetbrains.annotations.NotNull;
+import org.jspecify.annotations.Nullable;
@State(
name = "GoogleJavaFormatSettings",
diff --git a/pom.xml b/pom.xml
index 2b426cee1..152fdfde2 100644
--- a/pom.xml
+++ b/pom.xml
@@ -88,7 +88,7 @@
1.8
32.1.3-jre
1.4.0
- 3.21.2
+ 0.3.0
2.16
1.9
1.0.1
@@ -107,9 +107,9 @@
- org.checkerframework
- checker-qual
- ${checker.version}
+ org.jspecify
+ jspecify
+ ${jspecify.version}
com.google.errorprone