Skip to content

Commit 3622daf

Browse files
cpovirkJimfs Team
authored and
Jimfs Team
committed
Migrate from Checker Framework annotations to JSpecify.
RELNOTES=n/a PiperOrigin-RevId: 704266700
1 parent 5245040 commit 3622daf

39 files changed

+42
-42
lines changed

jimfs/pom.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@
6161
<optional>true</optional>
6262
</dependency>
6363
<dependency>
64-
<groupId>org.checkerframework</groupId>
65-
<artifactId>checker-qual</artifactId>
64+
<groupId>org.jspecify</groupId>
65+
<artifactId>jspecify</artifactId>
6666
<optional>true</optional>
6767
</dependency>
6868

jimfs/src/main/java/com/google/common/jimfs/AbstractWatchService.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
import java.util.concurrent.atomic.AtomicBoolean;
4343
import java.util.concurrent.atomic.AtomicInteger;
4444
import java.util.concurrent.atomic.AtomicReference;
45-
import org.checkerframework.checker.nullness.qual.Nullable;
45+
import org.jspecify.annotations.Nullable;
4646

4747
/**
4848
* Abstract implementation of {@link WatchService}. Provides the means for registering and managing

jimfs/src/main/java/com/google/common/jimfs/AclAttributeProvider.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
import java.nio.file.attribute.UserPrincipal;
3030
import java.util.List;
3131
import java.util.Map;
32-
import org.checkerframework.checker.nullness.qual.Nullable;
32+
import org.jspecify.annotations.Nullable;
3333

3434
/**
3535
* Attribute provider that provides the {@link AclFileAttributeView} ("acl").

jimfs/src/main/java/com/google/common/jimfs/AttributeProvider.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
import java.nio.file.attribute.FileAttributeView;
2525
import java.util.Arrays;
2626
import java.util.Map;
27-
import org.checkerframework.checker.nullness.qual.Nullable;
27+
import org.jspecify.annotations.Nullable;
2828

2929
/**
3030
* Abstract provider for handling a specific file attribute view.

jimfs/src/main/java/com/google/common/jimfs/AttributeService.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
import java.util.List;
3737
import java.util.Map;
3838
import java.util.Set;
39-
import org.checkerframework.checker.nullness.qual.Nullable;
39+
import org.jspecify.annotations.Nullable;
4040

4141
/**
4242
* Service providing all attribute related operations for a file store. One piece of the file store

jimfs/src/main/java/com/google/common/jimfs/BasicAttributeProvider.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
import java.nio.file.attribute.BasicFileAttributes;
2424
import java.nio.file.attribute.FileAttributeView;
2525
import java.nio.file.attribute.FileTime;
26-
import org.checkerframework.checker.nullness.qual.Nullable;
26+
import org.jspecify.annotations.Nullable;
2727

2828
/**
2929
* Attribute provider that provides attributes common to all file systems, the {@link

jimfs/src/main/java/com/google/common/jimfs/Configuration.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
import java.util.Map;
4646
import java.util.Set;
4747
import java.util.regex.Pattern;
48-
import org.checkerframework.checker.nullness.qual.Nullable;
48+
import org.jspecify.annotations.Nullable;
4949

5050
/**
5151
* Immutable configuration for an in-memory file system. A {@code Configuration} is passed to a

jimfs/src/main/java/com/google/common/jimfs/Directory.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
import com.google.errorprone.annotations.CanIgnoreReturnValue;
2323
import java.nio.file.attribute.FileTime;
2424
import java.util.Iterator;
25-
import org.checkerframework.checker.nullness.qual.Nullable;
25+
import org.jspecify.annotations.Nullable;
2626

2727
/**
2828
* A table of {@linkplain DirectoryEntry directory entries}.

jimfs/src/main/java/com/google/common/jimfs/DirectoryEntry.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
import java.nio.file.NotLinkException;
2828
import java.nio.file.Path;
2929
import java.util.Objects;
30-
import org.checkerframework.checker.nullness.qual.Nullable;
30+
import org.jspecify.annotations.Nullable;
3131

3232
/**
3333
* Entry in a directory, containing references to the directory itself, the file the entry links to

jimfs/src/main/java/com/google/common/jimfs/DosAttributeProvider.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
import java.nio.file.attribute.FileAttributeView;
2828
import java.nio.file.attribute.FileTime;
2929
import java.util.Map;
30-
import org.checkerframework.checker.nullness.qual.Nullable;
30+
import org.jspecify.annotations.Nullable;
3131

3232
/**
3333
* Attribute provider that provides the {@link DosFileAttributeView} ("dos") and allows the reading

jimfs/src/main/java/com/google/common/jimfs/File.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
import java.io.IOException;
2727
import java.nio.file.attribute.FileTime;
2828
import java.util.concurrent.locks.ReadWriteLock;
29-
import org.checkerframework.checker.nullness.qual.Nullable;
29+
import org.jspecify.annotations.Nullable;
3030

3131
/**
3232
* A file object, containing both the file's metadata and content.

jimfs/src/main/java/com/google/common/jimfs/FileSystemView.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
import java.util.Set;
5151
import java.util.concurrent.locks.Lock;
5252
import java.util.concurrent.locks.ReadWriteLock;
53-
import org.checkerframework.checker.nullness.qual.Nullable;
53+
import org.jspecify.annotations.Nullable;
5454

5555
/**
5656
* View of a file system with a specific working directory. As all file system operations need to

jimfs/src/main/java/com/google/common/jimfs/FileTree.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
import java.util.Iterator;
2828
import java.util.Map;
2929
import java.util.Set;
30-
import org.checkerframework.checker.nullness.qual.Nullable;
30+
import org.jspecify.annotations.Nullable;
3131

3232
/**
3333
* The tree of directories and files for the file system. Contains the file system root directories

jimfs/src/main/java/com/google/common/jimfs/Handler.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
import java.net.URL;
2424
import java.net.URLConnection;
2525
import java.net.URLStreamHandler;
26-
import org.checkerframework.checker.nullness.qual.Nullable;
26+
import org.jspecify.annotations.Nullable;
2727

2828
/**
2929
* {@link URLStreamHandler} implementation for jimfs. Named {@code Handler} so that the class can be

jimfs/src/main/java/com/google/common/jimfs/Jimfs.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
import java.util.UUID;
3434
import java.util.logging.Level;
3535
import java.util.logging.Logger;
36-
import org.checkerframework.checker.nullness.qual.Nullable;
36+
import org.jspecify.annotations.Nullable;
3737

3838
/**
3939
* Static factory methods for creating new Jimfs file systems. File systems may either be created

jimfs/src/main/java/com/google/common/jimfs/JimfsAsynchronousFileChannel.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
import java.util.concurrent.Callable;
3535
import java.util.concurrent.ExecutionException;
3636
import java.util.concurrent.ExecutorService;
37-
import org.checkerframework.checker.nullness.qual.Nullable;
37+
import org.jspecify.annotations.Nullable;
3838

3939
/**
4040
* {@link AsynchronousFileChannel} implementation that delegates to a {@link JimfsFileChannel}.

jimfs/src/main/java/com/google/common/jimfs/JimfsFileStore.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
import java.util.concurrent.locks.Lock;
3535
import java.util.concurrent.locks.ReadWriteLock;
3636
import java.util.concurrent.locks.ReentrantReadWriteLock;
37-
import org.checkerframework.checker.nullness.qual.Nullable;
37+
import org.jspecify.annotations.Nullable;
3838

3939
/**
4040
* {@link FileStore} implementation which provides methods for file creation, lookup and attribute

jimfs/src/main/java/com/google/common/jimfs/JimfsFileSystem.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
import java.nio.file.attribute.UserPrincipalLookupService;
3434
import java.util.concurrent.ExecutorService;
3535
import java.util.concurrent.Executors;
36-
import org.checkerframework.checker.nullness.qual.Nullable;
36+
import org.jspecify.annotations.Nullable;
3737

3838
/**
3939
* {@link FileSystem} implementation for Jimfs. Most behavior for the file system is implemented by

jimfs/src/main/java/com/google/common/jimfs/JimfsFileSystemProvider.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
import java.util.Map;
4949
import java.util.Set;
5050
import java.util.concurrent.ExecutorService;
51-
import org.checkerframework.checker.nullness.qual.Nullable;
51+
import org.jspecify.annotations.Nullable;
5252

5353
/**
5454
* {@link FileSystemProvider} implementation for Jimfs. This provider implements the actual file

jimfs/src/main/java/com/google/common/jimfs/JimfsPath.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
import java.util.Iterator;
4242
import java.util.List;
4343
import java.util.Objects;
44-
import org.checkerframework.checker.nullness.qual.Nullable;
44+
import org.jspecify.annotations.Nullable;
4545

4646
/**
4747
* Jimfs implementation of {@link Path}. Creation of new {@code Path} objects is delegated to the

jimfs/src/main/java/com/google/common/jimfs/JimfsSecureDirectoryStream.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
import java.nio.file.attribute.FileAttributeView;
3636
import java.util.Iterator;
3737
import java.util.Set;
38-
import org.checkerframework.checker.nullness.qual.Nullable;
38+
import org.jspecify.annotations.Nullable;
3939

4040
/**
4141
* Secure directory stream implementation that uses a {@link FileSystemView} with the stream's

jimfs/src/main/java/com/google/common/jimfs/Name.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
import com.google.common.annotations.VisibleForTesting;
2222
import java.util.Comparator;
23-
import org.checkerframework.checker.nullness.qual.Nullable;
23+
import org.jspecify.annotations.Nullable;
2424

2525
/**
2626
* Immutable representation of a file name. Used both for the name components of paths and as the

jimfs/src/main/java/com/google/common/jimfs/OwnerAttributeProvider.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
import java.nio.file.attribute.FileOwnerAttributeView;
2727
import java.nio.file.attribute.UserPrincipal;
2828
import java.util.Map;
29-
import org.checkerframework.checker.nullness.qual.Nullable;
29+
import org.jspecify.annotations.Nullable;
3030

3131
/**
3232
* Attribute provider that provides the {@link FileOwnerAttributeView} ("owner").

jimfs/src/main/java/com/google/common/jimfs/PathService.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
import java.util.ArrayList;
3939
import java.util.Comparator;
4040
import java.util.List;
41-
import org.checkerframework.checker.nullness.qual.Nullable;
41+
import org.jspecify.annotations.Nullable;
4242

4343
/**
4444
* Service for creating {@link JimfsPath} instances and handling other path-related operations.

jimfs/src/main/java/com/google/common/jimfs/PathType.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
import java.net.URISyntaxException;
2727
import java.nio.file.InvalidPathException;
2828
import java.util.Arrays;
29-
import org.checkerframework.checker.nullness.qual.Nullable;
29+
import org.jspecify.annotations.Nullable;
3030

3131
/**
3232
* An object defining a specific type of path. Knows how to parse strings to a path and how to

jimfs/src/main/java/com/google/common/jimfs/PathURLConnection.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
import java.util.Locale;
4444
import java.util.Map;
4545
import java.util.TimeZone;
46-
import org.checkerframework.checker.nullness.qual.Nullable;
46+
import org.jspecify.annotations.Nullable;
4747

4848
/**
4949
* {@code URLConnection} implementation.

jimfs/src/main/java/com/google/common/jimfs/PosixAttributeProvider.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
import java.nio.file.attribute.UserPrincipal;
3636
import java.util.Map;
3737
import java.util.Set;
38-
import org.checkerframework.checker.nullness.qual.Nullable;
38+
import org.jspecify.annotations.Nullable;
3939

4040
/**
4141
* Attribute provider that provides the {@link PosixFileAttributeView} ("posix") and allows reading

jimfs/src/main/java/com/google/common/jimfs/StandardAttributeProviders.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
package com.google.common.jimfs;
1818

1919
import com.google.common.collect.ImmutableMap;
20-
import org.checkerframework.checker.nullness.qual.Nullable;
20+
import org.jspecify.annotations.Nullable;
2121

2222
/**
2323
* Static registry of {@link AttributeProvider} implementations for the standard set of file

jimfs/src/main/java/com/google/common/jimfs/UnixAttributeProvider.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
import java.util.concurrent.ConcurrentHashMap;
2929
import java.util.concurrent.ConcurrentMap;
3030
import java.util.concurrent.atomic.AtomicInteger;
31-
import org.checkerframework.checker.nullness.qual.Nullable;
31+
import org.jspecify.annotations.Nullable;
3232

3333
/**
3434
* Attribute provider that provides the "unix" attribute view.

jimfs/src/main/java/com/google/common/jimfs/UnixPathType.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
import static com.google.common.base.Preconditions.checkArgument;
2020

2121
import java.nio.file.InvalidPathException;
22-
import org.checkerframework.checker.nullness.qual.Nullable;
22+
import org.jspecify.annotations.Nullable;
2323

2424
/**
2525
* Unix-style path type.

jimfs/src/main/java/com/google/common/jimfs/UserDefinedAttributeProvider.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
import java.nio.file.attribute.FileAttributeView;
2626
import java.nio.file.attribute.UserDefinedFileAttributeView;
2727
import java.util.List;
28-
import org.checkerframework.checker.nullness.qual.Nullable;
28+
import org.jspecify.annotations.Nullable;
2929

3030
/**
3131
* Attribute provider that provides the {@link UserDefinedFileAttributeView} ("user"). Unlike most

jimfs/src/main/java/com/google/common/jimfs/WindowsPathType.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
import java.util.Iterator;
2121
import java.util.regex.Matcher;
2222
import java.util.regex.Pattern;
23-
import org.checkerframework.checker.nullness.qual.Nullable;
23+
import org.jspecify.annotations.Nullable;
2424

2525
/**
2626
* Windows-style path type.

jimfs/src/test/java/com/google/common/jimfs/AbstractPathMatcherTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
import java.nio.file.WatchService;
3535
import java.util.Iterator;
3636
import java.util.regex.PatternSyntaxException;
37-
import org.checkerframework.checker.nullness.qual.Nullable;
37+
import org.jspecify.annotations.Nullable;
3838

3939
/**
4040
* Abstract base class for tests of {@link PathMatcher} implementations.

jimfs/src/test/java/com/google/common/jimfs/DirectoryTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
import com.google.common.collect.Iterables;
2929
import java.util.HashSet;
3030
import java.util.Set;
31-
import org.checkerframework.checker.nullness.qual.Nullable;
31+
import org.jspecify.annotations.Nullable;
3232
import org.junit.Before;
3333
import org.junit.Test;
3434
import org.junit.runner.RunWith;

jimfs/src/test/java/com/google/common/jimfs/FileTreeTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
import java.util.HashMap;
3333
import java.util.Map;
3434
import java.util.Random;
35-
import org.checkerframework.checker.nullness.qual.Nullable;
35+
import org.jspecify.annotations.Nullable;
3636
import org.junit.Before;
3737
import org.junit.Test;
3838
import org.junit.runner.RunWith;

jimfs/src/test/java/com/google/common/jimfs/PathSubject.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
import java.util.ArrayList;
3838
import java.util.Arrays;
3939
import java.util.List;
40-
import org.checkerframework.checker.nullness.qual.Nullable;
40+
import org.jspecify.annotations.Nullable;
4141

4242
/**
4343
* Subject for doing assertions on file system paths.

jimfs/src/test/java/com/google/common/jimfs/PathTypeTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
import com.google.common.collect.ImmutableList;
2323
import com.google.common.jimfs.PathType.ParseResult;
2424
import java.net.URI;
25-
import org.checkerframework.checker.nullness.qual.Nullable;
25+
import org.jspecify.annotations.Nullable;
2626
import org.junit.Test;
2727
import org.junit.runner.RunWith;
2828
import org.junit.runners.JUnit4;

jimfs/src/test/java/com/google/common/jimfs/TestAttributeProvider.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
import java.nio.file.attribute.FileTime;
2727
import java.util.HashMap;
2828
import java.util.Map;
29-
import org.checkerframework.checker.nullness.qual.Nullable;
29+
import org.jspecify.annotations.Nullable;
3030

3131
/** @author Colin Decker */
3232
public final class TestAttributeProvider extends AttributeProvider {

pom.xml

+3-3
Original file line numberDiff line numberDiff line change
@@ -129,9 +129,9 @@
129129
<version>3.0.2</version>
130130
</dependency>
131131
<dependency>
132-
<groupId>org.checkerframework</groupId>
133-
<artifactId>checker-qual</artifactId>
134-
<version>3.48.2</version>
132+
<groupId>org.jspecify</groupId>
133+
<artifactId>jspecify</artifactId>
134+
<version>1.0.0</version>
135135
</dependency>
136136

137137
<!-- Test dependencies -->

0 commit comments

Comments
 (0)