diff --git a/README.md b/README.md index b41004c0..d12436ed 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,7 @@ The final output of Annotator is a source code that passes NullAway checks with In the code below, `NullAway` reports five warnings. ```java +package com.example; class Test{ Object f1 = null; // warning: assigning @Nullable expression to @NonNull field Object f2 = null; // warning: assigning @Nullable expression to @NonNull field @@ -49,6 +50,7 @@ For unresolved errors, suppression annotations are injected. The output below shows the result of running `Annotator` on the code above. ```java +package com.example; import javax.annotation.Nullable; // added by Annotator import org.jspecify.annotations.NullUnmarked; // added by Annotator diff --git a/sample/build.gradle b/sample/build.gradle index df2fe935..b6b2a953 100644 --- a/sample/build.gradle +++ b/sample/build.gradle @@ -57,7 +57,7 @@ tasks.withType(JavaCompile).configureEach { options.errorprone { check("NullAway", CheckSeverity.ERROR) check("AnnotatorScanner", CheckSeverity.ERROR) - option("NullAway:AnnotatedPackages", "edu.ucr.cs.riple") + option("NullAway:AnnotatedPackages", "com.example") option("NullAway:SerializeFixMetadata", "true") option("NullAway:FixSerializationConfigPath", nullaway_config_path) option("AnnotatorScanner:ConfigPath", scanner_config_path) diff --git a/sample/src/main/java/edu/ucr/cs/riple/annotator/sample/Test.java b/sample/src/main/java/edu/ucr/cs/riple/annotator/sample/Test.java index 2dbf12aa..a9c3edf2 100644 --- a/sample/src/main/java/edu/ucr/cs/riple/annotator/sample/Test.java +++ b/sample/src/main/java/edu/ucr/cs/riple/annotator/sample/Test.java @@ -22,7 +22,7 @@ * THE SOFTWARE. */ -package edu.ucr.cs.riple.annotator.sample; +package com.example; public class Test { Object f1 = null;