1Changelog 2========= 3Version 0.9.5 4------------- 5* JDK17 support improvements: 6 - Fix crash with switch expression as a lambda body (#543, follow up: #545) 7 - Better fix for crash on member selects inside module-info.java (#544) 8* Bump Guava dependency to 24.1.1 (#536) 9* Build / CI tooling for NullAway itself: 10 - Bump AutoValue and AutoService versions (#538) 11 - Add task to run NullAway on itself (#542) 12 - Add test case for unsound map reassignment handling (#541) 13 14Version 0.9.4 15------------- 16* Fix crash with fully-qualified names in module-info.java import (#534) 17 18Version 0.9.3 19------------- 20IMPORTANT: This version introduces EXPERIMENTAL JDK17 support. 21 There is a known crash on lambdas with switch expressions as body 22 (see #524). Best current workaround is to 23 `@SuppressWarnings("NullAway")` on the enclosing method 24* Improve reporting of multiple parameter errors on a single method call (#503) 25* Support compile-time constant field args in method Access Paths (#504) 26* Add basic library support for grpc Metadata through GrpcHandler (#505) 27* Fix soundness bug with dereference of ternary expressions (#516) 28* Add support for switch expressions (#520) [JDK 17] 29* Allow setting custom Nullable Annotation via Error Prone CLI flags (#522) 30* Add JarInfer models for Android SDK 31 (Android 12) (#532) 31* Build / CI tooling for NullAway itself: 32 - Prevent JMH tests from running on pre-v11 JDKs (#492) 33 - Bump to Error Prone 2.8.1 (#494), 2.9.0 (#497), and 2.10.0 (#507) 34 - Docs: Fix a broken link in README.md (#495) 35 - Update to Gradle 7.2 (#496), 7.3.1 (#509), and 7.3.3 (#530) 36 - Add Autodispose benchmark (#498) 37 - Bump jmh plugin to 0.6.6 (#500) 38 - Bump to Checker dataflow 3.20.0 (#510) 39 - CI tests for JDK 17 (#512) 40 - Some fixes to GitHub Actions config (#514) 41 - Make jar-infer-lib tests pass on JDK 11 (#523) 42 - Extra tests for all DummyOptionsConfig's methods (#525) 43 - Pull jmh Gradle plugin version to top level (#526) 44 - Add tests for JDK 16+ records (#527) 45 - Support for Coveralls on multiple modules (#521) 46 - Changes to avoid re-running Gradle tasks unnecessarily (#528) 47 48Version 0.9.2 49------------- 50* Allow specifying custom names for Contract annotations (#476) 51* Use shaded Checker Framework dataflow artifact made for NullAway (#485) 52* Bump Checker dataflow to 3.16.0 (#490) 53* Library Models: 54 - Add library model for java.nio.file.Path.getParent() (#464) 55 - Default models support for Spring's Autowired (#477) 56 - Models for `Objects.requireNonNull()` with `Supplier` (#483) 57* Build / CI tooling for NullAway itself: 58 - Small Gradle build cleanup (#469) 59 - Allow Error Prone API version to be configured via a property (#470) 60 - Also test NullAway on Error Prone 2.6.0 (#471) 61 - Check our code with Error Prone 2.6.0 (#472) [temporary, see below] 62 - Check code with Error Prone 2.7.1 (#480) 63 - Update to Gradle 7.0.2 (#481) then 7.1 (#486) 64 - Add a jmh module for benchmarking (#487, #489) 65 - Test on CI with Error Prone 2.8.0 (#491) 66 67Version 0.9.1 68-------------- 69* Add baseline support for (Java 15) records (#377) 70* Multiple build tooling fixed: 71 - Update Gradle to 6.8.3 (#451) 72 - Gradle: switch to java-library plugin where possible (#455) 73 - Switch from mvn-push script to gradle-maven-publish-plugin (#457) 74 - Fix publication of fat jar for jar-infer-cli. (#461) 75* Add JarInfer models for Android 11 (SDK 30) (#460) 76 77Version 0.9.0 78-------------- 79* IMPORTANT: Error Prone minimum version moved to 2.4.0 (#447) 80 - This allows compatibility with Error Prone 2.5.1 by 81 moving to updated APIs. 82 - Remove Checker Framework shadow config from nullaway module (#449) 83* `@Contract` annotations are now checked (#312) (#428) (#450) 84* Add support for @RequiresNonnull/@EnsuresNonnull annotations (#423) 85* [Fix] Handle WideningConversionNode in Map key specifiers (#415) 86* [Fix] Try to handle lombok.Builder without crashing. (#414) 87* [Fix] Ignore library models return nullability on first-party code (#446) 88* Update to Checker Dataflow dependency to 3.6.0 (#416) 89* Library Models: 90 - Add library model for TextView.getLayout() (#418) 91 - Add library model for Service.onStartCommand (#419) 92 - Models for common Spring/Spark/Apache utility classes (#436) 93 - Add support for jakarta.inject-api (#439) 94* Build / CI tooling for NullAway itself: 95 - Update to Gradle 6.6.1 (#420) 96 - Switch CI to GitHub Actions (#440) (#442) (#450) 97 98Version 0.8.0 99-------------- 100* Improve suppression of subcheckers, using full AST path (#392) 101* Support null implies false library models (#394) 102* Make `@ChecksForNull` an alias for `@Nullable` (#397) 103* Fix: android-jar.py's exit code. (#399) 104* Upgrade Error Prone dependencies to 2.4.0. (#400) 105 - And fix detected issues (#403, #404) 106* Allow library models of the form null param -> null return (#407) 107* Make excluded class annotations work on nested classes (#412) 108* Improved Map handling: Strings and integers. (#413) 109* Also `-SNAPSHOT` builds are being published correctly again (#409) 110* New android-jarinfer-models-sdk29 artifact for Android 10 111 112Version 0.7.10 113-------------- 114* Add Java 8 streams nullness-propagation support (#371) 115* Give line numbers for uninitialized fields when reporting error on an initializer (#380) 116* Include outer$inner class name when reporting field init errors (#375) 117* Update to Gradle 6.1.1 (#381) 118* Add @MonotonicNonNull as lazy initialization annotation. (#383) 119* Add default library model for CompilationUnitTree.getPackageName() (#384) 120* Improve matching of native Map methods (#390) 121 - Fixes an IndexOutOfBoundsException checker crash 122 123Version 0.7.9 124------------- 125* Multiple dependency upgrades 126 - Gradle to 5.6.2. (#362) 127 - WALA to 1.5.4 (#337) 128 - Checker Dataflow to 3.0.0 (#369) 129* Added OPTIONAL_CONTENT synthetic field to track Optional emptiness (#364) 130 - With this, `-XepOpt:NullAway:CheckOptionalEmptiness` should be 131 ready for use. 132* Handle Nullchk operator (#368) 133 134Version 0.7.8 135------------- 136* Added NullAway.Optional suppression (#359) 137* [JarInfer] Ignore non-public classes when inferring annotations. (#360) 138 139Version 0.7.7 140------------- 141* [Optionals] Support Optional isPresent call in assertThat (#349) 142* Preconditions checkNotNull support, added missing cases. (#355) 143* [JarInfer] Use Android Nullable/NonNull annotations for AARs (not javax) (#357) 144 145Version 0.7.6 146------------- 147* Library models for guava's AsyncFunction (#328) 148* Annotate StringUtils.isBlank() of org.apache.commons (lang & lang3) (#330) 149* Adding support for Aar-to-aar transformation (#334) 150* Add support for @RecentlyNullable and @RecentlyNonNull (#335) 151* Update to Gradle 5.5.1 (#336) 152* Don't compute frames on bytecode writting in JarInfer (#338) 153* Use exact jar output path when possible in JarInfer (#339) 154* Avoid adding redundant annotations during bytecode rewriting in JarInfer (#341) 155* Handle cases when there are no annotations on methods or parameters in JarInfer (#342) 156* Fix #333 Nullaway init suppression issue (#343) 157* Add option to JarInfer to deal with signed jars (#345) 158* Fix #344 onActivityCreated known initializer (#346) 159* Skip read-before-init analysis for assert statements (#348) 160 161Version 0.7.5 162------------ 163* Allow models to override @nullable on third-party functional interfaces (#326) 164 - Defines Guava's Function and Predicate as @NonNull->@NonNull 165 by default. 166 167Version 0.7.4 168------------- 169* Add support for Jar to Jar transformation to JarInfer (#316) 170* Refactor the driver and annotation summary type in JarInfer (#317) 171* Minor refactor and cleanup in JarInfer-lib (#319) 172* Different approach for param analysis (#320) 173* Fix @NullableDecl support (#324) 174* Treat methods of final classes as final for initialization. (#325) 175 176Version 0.7.3 177------------- 178* Optional support for assertThat(...).isNotNull() statements (#304) 179* Fix NPE in AccessPathElement.toString() (#306) 180* Add tests for optional emptiness support with Rx (#308) 181* Support for assertThat in JUnit and Hamcrest. (#310) 182* Add support for CoreMatchers and core.IsNull in hamcrest. (#311) 183* Make class-level caches for InferredJARModelsHandler instance fields. (#315) 184 185Version 0.7.2 186------------- 187* Install GJF hook using a gradle task, rather than a gradlew hack (#298). 188* Nullable switch expression support (#300). 189* Upgrade to Error Prone 2.3.3 (#295). 190Update Gradle, Error Prone plugin, and Android Gradle Plugin (#294). 191Add support for UNSIGNED_RIGHT_SHIFT (#303). 192 193Version 0.7.1 194-------------- 195* Remove warning about @nullable var args (#296). 196 197Version 0.7.0 198-------------- 199* Added Optional emptiness handler (#278). 200 `-XepOpt:NullAway:CheckOptionalEmptiness=true` to enable (experimental) support for `Optional` emptiness. 201* Improved (partial but sound-er) varargs support (#291). 202* Refactor for ErrorMessage class use (#284). 203* Custom path to Optional class for Optional emptiness handler (#288). 204* Add support for methods taking literal constant args in Access Paths. (#285). 205 206Version 0.6.6 207--------------- 208This only adds a minor library fix supporting Guava's Preconditions.checkNotNull with an error message 209argument (#283) 210 211Version 0.6.5 212--------------- 213* Various fixes for generating @SuppressWarnings (#271) 214* Improved error message now doesn't tell users to report NullAway config errors to Error Prone (#273) 215* Adding support for Activity and Fragment coming from the support libraries (#275) 216* Library models fixes (#277) 217* Add Fragment.onViewCreated as a known initializer. (#279) 218 219Version 0.6.4 220--------------- 221* Initial support for JDK 11 (#263). Core NullAway should be working, but JarInfer does not yet work. 222* Disable JarInfer handler by default (#261). `-XepOpt:NullAway:JarInferEnabled=true` is now required to enable the JarInfer handler. 223* Add models for Apache StringUtils isEmpty methods (#264) 224* Optimize library model lookups to reduce overhead (#265) 225 226Version 0.6.3 227------------- 228* Fix handling of enhanced for loops (#256) 229 230Version 0.6.2 231------------- 232* Handle lambda override with AcknowledgeRestrictiveAnnotations (#255) 233* Handle interaction between AcknowledgeRestrictiveAnnotations and TreatGeneratedAsUnannotated (#254) 234 235Version 0.6.1 236------------- 237* Enable excluded class annotations to (mostly) work on inner classes (#239) 238* Assertion of not equal to null updates the access path (#240) 239* Update Gradle examples in README (#244) 240* Change how jarinfer finds astubx model jars. (#243) 241* Update to Error Prone 2.3.2 (#242) 242* Update net.ltgt.errorprone to 0.6, and build updates ((#248) 243* Restrictive annotated method overriding (#249) 244 Note: This can require significant annotation changes if 245 `-XepOpt:NullAway:AcknowledgeRestrictiveAnnotations=true` is set. 246 Not a new minor version, since that option is false by default. 247* Fix error on checking the initTree2PrevFieldInit cache. (#252) 248* Add support for renamed android.support packages in models. (#253) 249 250Version 0.6.0 251------------- 252* Add support for marking library parameters as explicitly @Nullable (#228) 253* De-genericize NullnessStore (#231) 254* Bump Checker Framework to 2.5.5 (#233) 255* Pass nullability info on enclosing locals into dataflow analysis for 256 lambdas and anonymous / local classes (#235) 257 258Version 0.5.6 259------------- 260* Add coverage measurement through coveralls. (#224) 261* Fix empty comment added when AutoFixSuppressionComment is not set. (#225) 262* Make JarInfer generated jars fully deterministic by removing timestamps. (#227) 263 264Version 0.5.5 265------------- 266* Allow for custom Error URLS (#220) 267* Fix crash with native methods invoked from initializer (#222) 268 269Version 0.5.4 270------------- 271* Add AutoFixSuppressionComment flag. (#213) 272* [JarInfer] Write to/load from separate astubx model jars (#214) 273* Update readme and tooling versions (#217) 274* Update to Error Prone 2.3.1 and centralize Java compiler flags (#218) 275* [JarInfer] Handler for @Nullable return value annotations (#216) 276 277Version 0.5.3 278------------- 279* JarInfer: Third-party bytecode analysis (MVP version) (#199) 280* Handle @NotNull in hasNonNullAnnotation. (#204) 281* Handler for separate Android models jar (#206) 282* fix: zip entry size error (#207) 283* Small test for restrictive annotations and generics. (#209) 284* Create android-jarinfer-models-sdk28 and fix release scripts. (#210) 285* JarInfer checks for null tested parameters #211 286 287Note: This is the first release to include jar-infer-cli, jar-infer-lib, and 288android-jarinfer-models-sdk28 artifacts 289 290Version 0.5.2 291------------- 292* Fix NPE in Thrift handler on complex receiver expressions (#195) 293* Add ExcludedFieldAnnotations unit tests. (#192) 294* Various crash fixes (#196) 295* Fix @NonNull argument detection in RestrictiveAnnotationHandler. (#198) 296 297Version 0.5.1 298------------- 299* Various fixes for AcknowledgeRestrictiveAnnotations (#194) 300 301Version 0.5.0 302------------- 303* Breaking change: Warn when castToNonNull method is not passed @NonNull (#191) 304* Add -XepOpt:NullAway:AcknowledgeRestrictiveAnnotations config flag. (#189) 305 - WARNING: This feature is broken in this release, fixed on 0.5.1 306* Add support for LEFT_SHIFT and RIGHT_SHIFT (#188) 307* Remove a suppression from a test that doesn't need it. (#183) 308* Support Objects.isNull (#179) 309 310Version 0.4.7 311------------- 312* Clean up some unnecessary state (#168) 313* Properly read type use annotations when code is present as a class file (#172) 314* Fix NPE inside NullAway when initializer methods use try-with-resources (#177) 315 316Version 0.4.6 317------------- 318* Fix a couple of Thrift issues (#164) 319* Don't report initialization warnings on fields for @ExternalInit classes with 320 no initializer methods (#166) 321 322Version 0.4.5 323------------- 324* Fix bug with handling Thrift `TBase.isSet()` calls (#161) 325 326Version 0.4.4 327------------- 328* add UnannotatedClasses option (#160) 329 330Version 0.4.3 331------------- 332* properly handle compound assignments (#157) 333* handle unboxing of array index expression (#158) 334 335Version 0.4.2 336------------- 337* Upgrade Checker Framework dependency to upstream version 2.5.0 (#150) 338* Don't crash on field initialization inside an enum (#146) 339* Properly find super constructor for anonymous classes (#147) 340* Add a Handler for supporting isSetXXXX() methods in Thrift-generated code (#148) 341* Use `@SuppressWarnings` as autofix in a couple more places (#149) 342 343Version 0.4.1 344------------- 345* Initial RxNullabilityPropagator support for method 346 references. (#141) 347 348Version 0.4.0 349------------- 350* Support for checking uses of method references (#139, #140). Note 351 that this may lead to new NullAway warnings being reported for code 352 that previously passed. 353* Add support for `Observable.doOnNext` to RxNullabilityPropagator 354 (#137) 355 356Version 0.3.7 357------------- 358* Small bug fix in `@Contract` support (#136) 359 360Version 0.3.6 361------------- 362* Support for a subset of JetBrains `@Contract` annotations (#129) 363* Built-in support for JUnit 4/5 assertNotNull, Objects.requireNonNull 364* Fix crash when using try-with-resource with an empty try block. (#135) 365 366Version 0.3.5 367------------- 368* Support for treating `@Generated`-annotated classes as unannotated (#127) 369 370Version 0.3.4 371------------- 372* Support for classes with external initialization (#124) 373 374Version 0.3.3 375------------- 376* Made dependence on Guava explicit (#120) 377* Significantly improved handling of try/finally (#123) 378 379Version 0.3.2 380------------- 381* Just fixed a Gradle configuration problem 382 383Version 0.3.1 (never made it to Maven Central) 384------------- 385* Bug fixes (#107, #108, #110, #112) 386 387Version 0.3.0 388------------- 389* Update library models to require full method signatures rather than 390 just method names (#90). This is an API-breaking change; if you've 391 written your own library models, they will need to be updated. 392* Support @BeforeEach and @BeforeAll as initializer annotations, and 393 @Inject and @LazyInit as excluded field annotations. (#81) 394* Support Checker Framework's @NullableDecl annotation (#84) 395* Add models for java.util.Deque methods (#86) 396* Add model for WebView.getUrl() (#91) 397 398Version 0.2.2 399------------- 400* minor fixes (#69, #71) 401 402Version 0.2.1 403------------- 404* Fix bug with accesses of fields from unannotated packages (#67) 405* Add models for ArrayDeque (#68) 406 407Version 0.2.0 408------------- 409* New feature: NullAway now does some checking that `@NonNull` fields 410 are not used before the are initialized (#58, #63). Updating to 411 0.2.0 may cause "read before initialized" problems to be detected in 412 code that was NullAway-clean before. 413* Model `Throwable.getMessage()` as returning `@Nullable`, matching 414 the spec. This may also cause new warnings in code that was 415 previously NullAway-clean. 416 417Version 0.1.8 418------------- 419* Make NullAway's Error Prone dependence compileOnly (#50). This could help reduce size of annotation processor paths, speeding build times. 420* Handle AND, OR, XOR expressions getting autoboxed (#55) 421* Handle @Nullable type use annotations (#56) 422 423Version 0.1.7 424------------- 425* -XepOpt:NullAway:ExcludedClasses accepts package prefixes. (#38) 426* Handle unary minus and unary plus (#40) 427* Handle prefix increment / decrement (#43) 428* add check for unannotated packages when excluding a class (#46) 429 430Version 0.1.6 431------------- 432 433* We now check static fields and initializer blocks (#34) 434* Fix for lambdas where the functional interface method had `void` return type (#37) 435 436Version 0.1.5 437------------- 438* Add finer grained suppressions and auto-fixes (#31). You can 439 suppress initialization errors specifically now with 440 `@SuppressWarnings("NullAway.Init")` 441* Fix performance issue with lambdas (#29) 442* Add lambda support to the RxNullabilityPropagator handler. (#12) 443 444Version 0.1.4 445------------- 446* Another lambda fix (#23) 447 448Version 0.1.3 449------------- 450* Fixes for lambdas (#13, #17) 451 452Version 0.1.2 453------------- 454 455* Downgrade Checker Framework due to crash (#7) 456* More modeling of Rx operators (#8) 457 458Version 0.1.1 459------------- 460 461* Update Checker Framework dependence to pick up bug fix (#4) 462 463 464Version 0.1.0 465------------- 466 467* Initial release 468