| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent d39e722 commit ee680cb
92 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -15,8 +15,8 @@ | |||
| 15 | 15 | <artifactId>guava</artifactId> | |
| 16 | 16 | </dependency> | |
| 17 | 17 | <dependency> | |
| 18 | - <groupId>org.checkerframework</groupId> | ||
| 19 | - <artifactId>checker-qual</artifactId> | ||
| 18 | + <groupId>org.jspecify</groupId> | ||
| 19 | + <artifactId>jspecify</artifactId> | ||
| 20 | 20 | </dependency> | |
| 21 | 21 | <dependency> | |
| 22 | 22 | <groupId>junit</groupId> | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -20,13 +20,15 @@ | |||
| 20 | 20 | import static com.google.common.truth.Fact.simpleFact; | |
| 21 | 21 | ||
| 22 | 22 | import java.lang.reflect.Array; | |
| 23 | - import org.checkerframework.checker.nullness.qual.Nullable; | ||
| 23 | + import org.jspecify.annotations.NullMarked; | ||
| 24 | + import org.jspecify.annotations.Nullable; | ||
| 24 | 25 | ||
| 25 | 26 | /** | |
| 26 | 27 | * A common supertype for Array subjects, abstracting some common display and error infrastructure. | |
| 27 | 28 | * | |
| 28 | 29 | * @author Christian Gruber (cgruber@israfil.net) | |
| 29 | 30 | */ | |
| 31 | + @NullMarked | ||
| 30 | 32 | abstract class AbstractArraySubject extends Subject { | |
| 31 | 33 | private final @Nullable Object actual; | |
| 32 | 34 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -33,7 +33,8 @@ | |||
| 33 | 33 | import java.io.InputStream; | |
| 34 | 34 | import java.util.ArrayList; | |
| 35 | 35 | import java.util.Map.Entry; | |
| 36 | - import org.checkerframework.checker.nullness.qual.Nullable; | ||
| 36 | + import org.jspecify.annotations.NullMarked; | ||
| 37 | + import org.jspecify.annotations.Nullable; | ||
| 37 | 38 | import org.objectweb.asm.ClassReader; | |
| 38 | 39 | import org.objectweb.asm.ClassVisitor; | |
| 39 | 40 | import org.objectweb.asm.Handle; | |
@@ -69,6 +70,7 @@ | |||
| 69 | 70 | */ | |
| 70 | 71 | @GwtIncompatible | |
| 71 | 72 | @J2ktIncompatible | |
| 73 | + @NullMarked | ||
| 72 | 74 | final class ActualValueInference { | |
| 73 | 75 | /** <b>Call {@link Platform#inferDescription} rather than calling this directly.</b> */ | |
| 74 | 76 | static @Nullable String describeActualValue(String className, String methodName, int lineNumber) { | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -19,13 +19,15 @@ | |||
| 19 | 19 | import static com.google.common.truth.Fact.makeMessage; | |
| 20 | 20 | ||
| 21 | 21 | import com.google.common.collect.ImmutableList; | |
| 22 | - import org.checkerframework.checker.nullness.qual.Nullable; | ||
| 22 | + import org.jspecify.annotations.NullMarked; | ||
| 23 | + import org.jspecify.annotations.Nullable; | ||
| 23 | 24 | ||
| 24 | 25 | /** | |
| 25 | 26 | * An {@link AssertionError} composed of structured {@link Fact} instances and other string | |
| 26 | 27 | * messages. | |
| 27 | 28 | */ | |
| 28 | 29 | @SuppressWarnings("OverrideThrowableToString") // We intentionally hide the class name. | |
| 30 | + @NullMarked | ||
| 29 | 31 | final class AssertionErrorWithFacts extends AssertionError implements ErrorWithFacts { | |
| 30 | 32 | private final ImmutableList<Fact> facts; | |
| 31 | 33 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -20,13 +20,15 @@ | |||
| 20 | 20 | import static com.google.common.truth.Fact.simpleFact; | |
| 21 | 21 | ||
| 22 | 22 | import java.math.BigDecimal; | |
| 23 | - import org.checkerframework.checker.nullness.qual.Nullable; | ||
| 23 | + import org.jspecify.annotations.NullMarked; | ||
| 24 | + import org.jspecify.annotations.Nullable; | ||
| 24 | 25 | ||
| 25 | 26 | /** | |
| 26 | 27 | * Propositions for {@link BigDecimal} typed subjects. | |
| 27 | 28 | * | |
| 28 | 29 | * @author Kurt Alfred Kluever | |
| 29 | 30 | */ | |
| 31 | + @NullMarked | ||
| 30 | 32 | public final class BigDecimalSubject extends ComparableSubject<BigDecimal> { | |
| 31 | 33 | private final @Nullable BigDecimal actual; | |
| 32 | 34 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -17,13 +17,15 @@ | |||
| 17 | 17 | ||
| 18 | 18 | import static com.google.common.truth.Fact.simpleFact; | |
| 19 | 19 | ||
| 20 | - import org.checkerframework.checker.nullness.qual.Nullable; | ||
| 20 | + import org.jspecify.annotations.NullMarked; | ||
| 21 | + import org.jspecify.annotations.Nullable; | ||
| 21 | 22 | ||
| 22 | 23 | /** | |
| 23 | 24 | * Propositions for boolean subjects. | |
| 24 | 25 | * | |
| 25 | 26 | * @author Christian Gruber (cgruber@israfil.net) | |
| 26 | 27 | */ | |
| 28 | + @NullMarked | ||
| 27 | 29 | public final class BooleanSubject extends Subject { | |
| 28 | 30 | private final @Nullable Boolean actual; | |
| 29 | 31 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -18,13 +18,15 @@ | |||
| 18 | 18 | import static com.google.common.base.Preconditions.checkNotNull; | |
| 19 | 19 | ||
| 20 | 20 | import com.google.common.annotations.GwtIncompatible; | |
| 21 | - import org.checkerframework.checker.nullness.qual.Nullable; | ||
| 21 | + import org.jspecify.annotations.NullMarked; | ||
| 22 | + import org.jspecify.annotations.Nullable; | ||
| 22 | 23 | ||
| 23 | 24 | /** | |
| 24 | 25 | * Propositions for {@link Class} subjects. | |
| 25 | 26 | * | |
| 26 | 27 | * @author Kurt Alfred Kluever | |
| 27 | 28 | */ | |
| 29 | + @NullMarked | ||
| 28 | 30 | @GwtIncompatible("reflection") | |
| 29 | 31 | @J2ktIncompatible | |
| 30 | 32 | public final class ClassSubject extends Subject { | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -18,14 +18,16 @@ | |||
| 18 | 18 | import static com.google.common.base.Preconditions.checkNotNull; | |
| 19 | 19 | ||
| 20 | 20 | import com.google.common.collect.Range; | |
| 21 | - import org.checkerframework.checker.nullness.qual.Nullable; | ||
| 21 | + import org.jspecify.annotations.NullMarked; | ||
| 22 | + import org.jspecify.annotations.Nullable; | ||
| 22 | 23 | ||
| 23 | 24 | /** | |
| 24 | 25 | * Propositions for {@link Comparable} typed subjects. | |
| 25 | 26 | * | |
| 26 | 27 | * @author Kurt Alfred Kluever | |
| 27 | 28 | * @param <T> the type of the object being tested by this {@code ComparableSubject} | |
| 28 | 29 | */ | |
| 30 | + @NullMarked | ||
| 29 | 31 | // TODO(b/136040841): Consider further tightening this to the proper `extends Comparable<? super T>` | |
| 30 | 32 | public abstract class ComparableSubject<T extends Comparable<?>> extends Subject { | |
| 31 | 33 | /** | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -21,12 +21,14 @@ | |||
| 21 | 21 | ||
| 22 | 22 | import com.google.common.collect.ImmutableList; | |
| 23 | 23 | import com.google.common.truth.Platform.PlatformComparisonFailure; | |
| 24 | - import org.checkerframework.checker.nullness.qual.Nullable; | ||
| 24 | + import org.jspecify.annotations.NullMarked; | ||
| 25 | + import org.jspecify.annotations.Nullable; | ||
| 25 | 26 | ||
| 26 | 27 | /** | |
| 27 | 28 | * An {@link AssertionError} (usually a JUnit {@code ComparisonFailure}, but not under GWT) composed | |
| 28 | 29 | * of structured {@link Fact} instances and other string messages. | |
| 29 | 30 | */ | |
| 31 | + @NullMarked | ||
| 30 | 32 | final class ComparisonFailureWithFacts extends PlatformComparisonFailure implements ErrorWithFacts { | |
| 31 | 33 | private final ImmutableList<Fact> facts; | |
| 32 | 34 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -26,7 +26,8 @@ | |||
| 26 | 26 | ||
| 27 | 27 | import com.google.common.annotations.VisibleForTesting; | |
| 28 | 28 | import com.google.common.collect.ImmutableList; | |
| 29 | - import org.checkerframework.checker.nullness.qual.Nullable; | ||
| 29 | + import org.jspecify.annotations.NullMarked; | ||
| 30 | + import org.jspecify.annotations.Nullable; | ||
| 30 | 31 | ||
| 31 | 32 | /** | |
| 32 | 33 | * Contains part of the code responsible for creating a JUnit {@code ComparisonFailure} (if | |
@@ -42,6 +43,7 @@ | |||
| 42 | 43 | * different implementation under GWT/j2cl, where {@code ComparisonFailure} is also unavailable but | |
| 43 | 44 | * we can't just recover from that at runtime. | |
| 44 | 45 | */ | |
| 46 | + @NullMarked | ||
| 45 | 47 | final class ComparisonFailures { | |
| 46 | 48 | static ImmutableList<Fact> makeComparisonFailureFacts( | |
| 47 | 49 | ImmutableList<Fact> headFacts, | |
| Back | FazBrowse Home | New Git URL |
0 commit comments