-
Notifications
You must be signed in to change notification settings - Fork 347
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge ../checker-framework-branch-master into rlc-ioutils-stub
- Loading branch information
Showing
6 changed files
with
89 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
...main/java/org/checkerframework/checker/nullness/permit-nullness-assertion-exception.astub
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
// This stub file makes the Nullness Checker not warn about null pointer | ||
// exceptions thrown by nullness assertion methods. There is no longer any | ||
// guarantee that your program will not throw a NullPointerException. | ||
|
||
import org.checkerframework.checker.nullness.qual.EnsuresNonNull; | ||
import org.checkerframework.checker.nullness.qual.Nullable; | ||
import java.util.function.Supplier; | ||
|
||
|
||
package java.util; | ||
|
||
public class Objects { | ||
@EnsuresNonNull("#1") | ||
public static <T> T requireNonNull(@Nullable T obj); | ||
@EnsuresNonNull("#1") | ||
public static <T> T requireNonNull(@Nullable T obj, String message); | ||
} | ||
|
||
|
||
// No annotations for com.google.common.base.Preconditions or | ||
// com.google.common.base.Verify are needed because they are annotated with | ||
// @CheckForNull and the Checker Framework treats @CheckForNull as @Nullable. | ||
|
||
|
||
package org.junit; | ||
|
||
public class Assertions { | ||
public static void assertNotNull(@Nullable Object actual); | ||
public static void assertNotNull(@Nullable Object actual, String message); | ||
public static void assertNotNull(@Nullable Object actual, Supplier<String> messageSupplier); | ||
} | ||
|
||
|
||
package org.junit.jupiter.api; | ||
|
||
public class Assertions { | ||
public static void assertNotNull(@Nullable Object actual); | ||
public static void assertNotNull(@Nullable Object actual, String message); | ||
public static void assertNotNull(@Nullable Object actual, Supplier<String> messageSupplier); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters