-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
check in the sample java file and
demo
script
- Loading branch information
Kevin Bourrillion
committed
Feb 1, 2023
1 parent
167941f
commit 538ab6d
Showing
2 changed files
with
22 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import org.jspecify.annotations.NullMarked; | ||
import org.jspecify.annotations.Nullable; | ||
|
||
@NullMarked | ||
class SimpleSample { | ||
Object passThrough(@Nullable Object mightBeNull) { | ||
return mightBeNull; | ||
} | ||
} |
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,13 @@ | ||
#!/bin/sh | ||
|
||
dir=$(dirname $0) | ||
rc_name=nullness-checker-for-checker-framework | ||
export CLASSPATH="$dir/../jspecify/build/libs/jspecify-0.0.0-SNAPSHOT.jar:$dir/build/libs/$rc_name.jar:$CLASSPATH" | ||
echo $CLASSPATH | ||
|
||
$dir/../checker-framework/checker/bin/javac \ | ||
-processorpath "$CLASSPATH" \ | ||
-processor com.google.jspecify.nullness.NullSpecChecker \ | ||
-AcheckImpl \ | ||
"$@" | ||
|