Skip to content

Commit

Permalink
check in the sample java file and demo script
Browse files Browse the repository at this point in the history
  • Loading branch information
Kevin Bourrillion committed Feb 1, 2023
1 parent 167941f commit 538ab6d
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
9 changes: 9 additions & 0 deletions SimpleSample.java
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;
}
}
13 changes: 13 additions & 0 deletions demo
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 \
"$@"

0 comments on commit 538ab6d

Please sign in to comment.