aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-02-16Build nullaway error prone plugin am: 37f980fd5f am: d4b678831c am: ef17bdf669t_frc_odp_330442040t_frc_odp_330442000t_frc_ase_330444010android-13.0.0_r83android-13.0.0_r82android-13.0.0_r81android-13.0.0_r80android-13.0.0_r79android-13.0.0_r78android-13.0.0_r77android-13.0.0_r76android-13.0.0_r75android-13.0.0_r74android-13.0.0_r73android-13.0.0_r72android-13.0.0_r71android-13.0.0_r70android-13.0.0_r69android-13.0.0_r68android-13.0.0_r67android-13.0.0_r66android-13.0.0_r65android-13.0.0_r64android-13.0.0_r63android-13.0.0_r62android-13.0.0_r61android-13.0.0_r60android-13.0.0_r59android-13.0.0_r58android-13.0.0_r57android-13.0.0_r56android-13.0.0_r55android-13.0.0_r54android-13.0.0_r53android-13.0.0_r52android-13.0.0_r51android-13.0.0_r50android-13.0.0_r49android-13.0.0_r48android-13.0.0_r47android-13.0.0_r46android-13.0.0_r45android-13.0.0_r44android-13.0.0_r43android-13.0.0_r42android-13.0.0_r41android-13.0.0_r40android-13.0.0_r39android-13.0.0_r38android-13.0.0_r37android-13.0.0_r36android-13.0.0_r35android-13.0.0_r34android-13.0.0_r33android-13.0.0_r32android-13.0.0_r30android-13.0.0_r29android-13.0.0_r28android-13.0.0_r27android-13.0.0_r24android-13.0.0_r23android-13.0.0_r22android-13.0.0_r21android-13.0.0_r20android-13.0.0_r19android-13.0.0_r18android-13.0.0_r17android-13.0.0_r16aml_wif_331910020aml_wif_331810010aml_wif_331710030aml_wif_331613000aml_wif_331511020aml_wif_331414000aml_wif_331310070aml_wif_331112000aml_wif_331016070aml_wif_330910030aml_wif_330810040aml_uwb_331910010aml_uwb_331820070aml_uwb_331613010aml_uwb_331611010aml_uwb_331410010aml_uwb_331310030aml_uwb_331115000aml_uwb_331015040aml_uwb_330810010aml_tz4_332714070aml_tz4_332714050aml_tz4_332714010aml_tz4_331910000aml_tz4_331314030aml_tz4_331314020aml_tz4_331314010aml_tz4_331012050aml_tz4_331012040aml_tz4_331012000aml_tet_331910040aml_tet_331820050aml_tet_331711040aml_tet_331511160aml_tet_331511000aml_tet_331412030aml_tet_331312080aml_tet_331117000aml_tet_331012080aml_tet_330911010aml_tet_330812150aml_swc_331911000aml_swc_331712000aml_swc_331612000aml_swc_331511000aml_swc_331410000aml_swc_331318000aml_swc_331116000aml_swc_331012020aml_sta_331910000aml_sta_331811000aml_sta_331711010aml_sta_331610000aml_sta_331511000aml_sta_331410000aml_sta_331311000aml_sta_331010010aml_sta_330910000aml_sdk_331812000aml_sdk_331811100aml_sdk_331811000aml_sdk_331412000aml_sdk_331410000aml_sdk_331310010aml_sdk_331111000aml_sdk_330810050aml_sdk_330810010aml_sch_331113000aml_sch_331111000aml_res_331820000aml_res_331611010aml_res_331512000aml_res_331314010aml_res_331114000aml_res_331011050aml_res_330910000aml_res_330810000aml_per_331913010aml_per_331812030aml_per_331710050aml_per_331611010aml_per_331512020aml_per_331411000aml_per_331313010aml_per_331115020aml_per_331019040aml_per_330912010aml_per_330811030aml_neu_331310000aml_neu_331113000aml_net_331910030aml_net_331812010aml_net_331710000aml_net_331610000aml_net_331412000aml_net_331313030aml_net_331313010aml_net_331110020aml_net_331011030aml_net_330910010aml_net_330811010aml_mpr_331918000aml_mpr_331812020aml_mpr_331711020aml_mpr_331613010aml_mpr_331512020aml_mpr_331412040aml_mpr_331311080aml_mpr_331112050aml_mpr_331112030aml_mpr_331011070aml_mpr_330911040aml_mpr_330811020aml_med_331911000aml_med_331712010aml_med_331612000aml_med_331511000aml_med_331410000aml_med_331318000aml_med_331115000aml_med_331012020aml_ips_331910010aml_ips_331312000aml_ips_331310000aml_ips_331111030aml_ips_331014020aml_go_wif_330911000aml_go_uwb_330912000aml_go_tz4_330912000aml_go_tet_330914010aml_go_swc_330913000aml_go_sta_330911000aml_go_sdk_330810000aml_go_sch_330911000aml_go_res_330912000aml_go_per_330912000aml_go_odp_330913000aml_go_odp_330912000aml_go_neu_330912000aml_go_net_330913000aml_go_mpr_330912000aml_go_med_330913000aml_go_ips_330911000aml_go_ext_330912000aml_go_doc_330912000aml_go_con_330913000aml_go_cbr_330912000aml_go_ase_330913000aml_go_art_330913000aml_go_ads_330915100aml_go_ads_330915000aml_go_ads_330913000aml_go_adb_330913000aml_ext_331814220aml_ext_331412000aml_ext_331312000aml_ext_331112010aml_ext_331012020aml_doc_331120000aml_con_331413000aml_con_331411000aml_con_331312000aml_con_331115000aml_con_331011010aml_cbr_331910000aml_cbr_331810000aml_cbr_331710020aml_cbr_331610010aml_cbr_331510000aml_cbr_331411000aml_cbr_331310010aml_cbr_331111030aml_cbr_331013010aml_cbr_330911010aml_cbr_330810000aml_ase_331311020aml_ase_331112000aml_ase_331011020aml_art_331813100aml_art_331813010aml_art_331711080aml_art_331612010aml_art_331413030aml_art_331314010aml_art_331113000aml_art_331012050aml_ads_331920180aml_ads_331814200aml_ads_331710270aml_ads_331611190aml_ads_331511020aml_ads_331418080aml_ads_331131000aml_adb_331610000aml_adb_331314020aml_adb_331113120aml_adb_331011050aml_adb_331011040android13-qpr3-s9-releaseandroid13-qpr3-s8-releaseandroid13-qpr3-s7-releaseandroid13-qpr3-s6-releaseandroid13-qpr3-s5-releaseandroid13-qpr3-s4-releaseandroid13-qpr3-s3-releaseandroid13-qpr3-s2-releaseandroid13-qpr3-s14-releaseandroid13-qpr3-s13-releaseandroid13-qpr3-s12-releaseandroid13-qpr3-s11-releaseandroid13-qpr3-s10-releaseandroid13-qpr3-s1-releaseandroid13-qpr3-releaseandroid13-qpr3-c-s8-releaseandroid13-qpr3-c-s7-releaseandroid13-qpr3-c-s6-releaseandroid13-qpr3-c-s5-releaseandroid13-qpr3-c-s4-releaseandroid13-qpr3-c-s3-releaseandroid13-qpr3-c-s2-releaseandroid13-qpr3-c-s12-releaseandroid13-qpr3-c-s11-releaseandroid13-qpr3-c-s10-releaseandroid13-qpr3-c-s1-releaseandroid13-qpr2-s9-releaseandroid13-qpr2-s8-releaseandroid13-qpr2-s7-releaseandroid13-qpr2-s6-releaseandroid13-qpr2-s5-releaseandroid13-qpr2-s3-releaseandroid13-qpr2-s2-releaseandroid13-qpr2-s12-releaseandroid13-qpr2-s11-releaseandroid13-qpr2-s10-releaseandroid13-qpr2-s1-releaseandroid13-qpr2-releaseandroid13-qpr2-b-s1-releaseandroid13-qpr1-s8-releaseandroid13-qpr1-s7-releaseandroid13-qpr1-s6-releaseandroid13-qpr1-s5-releaseandroid13-qpr1-s4-releaseandroid13-qpr1-s3-releaseandroid13-qpr1-s2-releaseandroid13-qpr1-s1-releaseandroid13-qpr1-releaseandroid13-mainline-wifi-releaseandroid13-mainline-uwb-releaseandroid13-mainline-tzdata4-releaseandroid13-mainline-tethering-releaseandroid13-mainline-sdkext-releaseandroid13-mainline-scheduling-releaseandroid13-mainline-resolv-releaseandroid13-mainline-permission-releaseandroid13-mainline-os-statsd-releaseandroid13-mainline-networking-releaseandroid13-mainline-mediaprovider-releaseandroid13-mainline-media-swcodec-releaseandroid13-mainline-media-releaseandroid13-mainline-ipsec-releaseandroid13-mainline-go-wifi-releaseandroid13-mainline-go-uwb-releaseandroid13-mainline-go-tzdata4-releaseandroid13-mainline-go-tethering-releaseandroid13-mainline-go-sdkext-releaseandroid13-mainline-go-scheduling-releaseandroid13-mainline-go-resolv-releaseandroid13-mainline-go-permission-releaseandroid13-mainline-go-os-statsd-releaseandroid13-mainline-go-odp-releaseandroid13-mainline-go-neuralnetworks-releaseandroid13-mainline-go-networking-releaseandroid13-mainline-go-mediaprovider-releaseandroid13-mainline-go-media-swcodec-releaseandroid13-mainline-go-media-releaseandroid13-mainline-go-ipsec-releaseandroid13-mainline-go-extservices-releaseandroid13-mainline-go-documentsui-releaseandroid13-mainline-go-conscrypt-releaseandroid13-mainline-go-cellbroadcast-releaseandroid13-mainline-go-art-releaseandroid13-mainline-go-appsearch-releaseandroid13-mainline-go-adservices-releaseandroid13-mainline-go-adbd-releaseandroid13-mainline-extservices-releaseandroid13-mainline-conscrypt-releaseandroid13-mainline-cellbroadcast-releaseandroid13-mainline-art-releaseandroid13-mainline-appsearch-releaseandroid13-mainline-adservices-releaseandroid13-mainline-adbd-releaseandroid13-frc-odp-releaseandroid13-devandroid13-d4-s2-releaseandroid13-d4-s1-releaseandroid13-d4-releaseandroid13-d3-s1-releaseandroid13-d2-releaseaml_tz4_332714010Fedor Kudasov
Original change: https://android-review.googlesource.com/c/platform/external/nullaway/+/1979447 Change-Id: I53c939f5a69a04987b02648fafcefda6c74fb47b
2022-02-16Build nullaway error prone plugin am: 37f980fd5f am: d4b678831cFedor Kudasov
Original change: https://android-review.googlesource.com/c/platform/external/nullaway/+/1979447 Change-Id: I0bdbcc755a4602bbb32b4e6ec7386f7ffac9e96e
2022-02-16Build nullaway error prone plugin am: 37f980fd5fFedor Kudasov
Original change: https://android-review.googlesource.com/c/platform/external/nullaway/+/1979447 Change-Id: I0f7374bb09b78bd0abdbeac267a57de492484d2a
2022-02-15Build nullaway error prone pluginFedor Kudasov
Bug: 218823409 Test: m nullaway_plugin Change-Id: I3bbd2d31a89f77918b7adcd0a5cb338e0a579106
2022-02-08Add license files am: 1b80a8f61e am: a42ceb3e06 am: 6a0d0a5fda am: c900ce84c8Fedor Kudasov
Original change: https://android-review.googlesource.com/c/platform/external/nullaway/+/1972865 Change-Id: I4d8f1889960d4bd8d61f015a95cae6b567fea353
2022-02-08Merge NullAway into Android codebase am: 30e45aecd8 am: bda5fa8ae0 am: ↵Fedor Kudasov
ba8f049f2c am: 78b356b7e2 Original change: https://android-review.googlesource.com/c/platform/external/nullaway/+/1972864 Change-Id: I0cf15acb028126f729be32452f056e79db667c32
2022-02-08Add license files am: 1b80a8f61e am: a42ceb3e06 am: 6a0d0a5fdaFedor Kudasov
Original change: https://android-review.googlesource.com/c/platform/external/nullaway/+/1972865 Change-Id: Icf4ca0fd74c4b9f890ca37253601dd5035bed7f8
2022-02-08Merge NullAway into Android codebase am: 30e45aecd8 am: bda5fa8ae0 am: ↵Fedor Kudasov
ba8f049f2c Original change: https://android-review.googlesource.com/c/platform/external/nullaway/+/1972864 Change-Id: Ib8429f180dc7604873792c47261889d824b11bf7
2022-02-08Add license files am: 1b80a8f61e am: a42ceb3e06Fedor Kudasov
Original change: https://android-review.googlesource.com/c/platform/external/nullaway/+/1972865 Change-Id: If0b158630d3b3b8bf88f32d1e885f2e805466edf
2022-02-08Merge NullAway into Android codebase am: 30e45aecd8 am: bda5fa8ae0Fedor Kudasov
Original change: https://android-review.googlesource.com/c/platform/external/nullaway/+/1972864 Change-Id: I694a4d2482698d731616aae7aa51b1297d6a6f9f
2022-02-08Add license files am: 1b80a8f61eFedor Kudasov
Original change: https://android-review.googlesource.com/c/platform/external/nullaway/+/1972865 Change-Id: I4f8dffa32a67be4ccad8dce8220982531fa71786
2022-02-08Merge NullAway into Android codebase am: 30e45aecd8Fedor Kudasov
Original change: https://android-review.googlesource.com/c/platform/external/nullaway/+/1972864 Change-Id: If38a23e842e0d935fc1e25644bc522c09e1226f9
2022-02-07Add license filesFedor Kudasov
Bug: 214088025 Test: N/A Change-Id: I32a2f1dbce6862cfb8ef691e228454a622d997b5
2022-02-04Merge NullAway into Android codebaseFedor Kudasov
Bug: 214088025 Test: N/A Change-Id: Iafed7c82ae79d3296a5f24584435f26451fbb123
2022-02-04Fix JarInfer integration test on Java 11 (#529)Manu Sridharan
Switch to using a service loader to load stubx files from jars on the classpath, to avoid doing our own classpath scanning (which is a pain to get working on Java 9+).
2022-01-31Enable build cache (#562)Manu Sridharan
2022-01-24Reason about key set iteration for subtypes of Map (#559)Manu Sridharan
Fixes #558 Most of the changes here are to thread around a `VisitorState` instead of a `Types` object, which allows us to use recommended Error Prone APIs to get a reference to a `Type` object and do subtype tests.
2022-01-21Reason about iterating over a map's key set using an enhanced for loop (#554)Manu Sridharan
Fixes #535 Uses the strategy outlined in this comment: https://github.com/uber/NullAway/issues/535#issuecomment-1006811236
2022-01-18Disable parallel builds and daemon for uploading snapshots (#555)Manu Sridharan
Now that parallel builds are enabled by default, we should disable them when uploading snapshots, to avoid errors due to concurrent uploads. We also disable the daemon since that is typical for such builds.
2022-01-18Require braces for all conditionals and loops (#556)Manu Sridharan
Enable the Error Prone [MissingBraces](http://errorprone.info/bugpattern/MissingBraces) check, and fix all violations.
2022-01-15Separating NullAwayTests into smaller files (#550)Jiahe Gellert Li
In response to issue #430: - Extracted test cases into different test classes. - Added an abstract `NullAwayTestsBase` containing common helper functions. - Configured Gradle to run tests in parallel
2022-01-14Switch to temurin to fix CI (#553)Manu Sridharan
The zulu OpenJDK distribution suddenly caused failures for us on JDK 8 and 17 on ubuntu. No idea why. Switching to temurin seems to fix the problem.
2022-01-14Add dependence from coveralls task to codeCoverageReport (#552)Manu Sridharan
2022-01-14Enable parallel builds (#549)Manu Sridharan
Gradle parallel builds have been stable for a while; enable to get the build time reduction
2022-01-12Initial empty repositoryRoman Yepishev
2022-01-12Small tweaks to handling of assignments in dataflow (#547)Manu Sridharan
We add two small tweaks to assignment handling (found while reading the code): 1. If we see an assignment `e.f = ...`, treat `e` as non-null on the non-exceptional successor (since the dereference succeeded), if it's an access path that we can track. We already did this for assignments to array elements; we should do the same for field assignments, for consistency. 2. Don't track nullability for variables and fields of primitive type, as they can never be de-referenced. This is an optimization that could reduce the size of the stores we propagate around. I didn't measure the impact, but it seems like an obvious, if small, win. I put the new test input in the same place as other similar ones in `NullAwayPositiveCases`, for consistency.
2022-01-10Improve nullness tracking of map calls in the presence of type casts (#537)Lázaro Clapp
When chains of `Map.get(a).get(b).get(c)` are used without casts, our existing map handling code suffices to keep track of non-null APs. However, this breaks in the presence of casts. Unfortunately, chains of maps with casts are a common way to handle hierarchical but untyped data sources, such as loaded JSON/Yaml. In general, casts make tracking of access paths equivalence harder. As such, with this change, we strip all casts when considering the receiver of a method call or field access for access path construction. This seems to handle the chained `Map<Object,Object>` pattern above, without being in any way specific to maps.
2022-01-10Prepare next development version.Lazaro Clapp
2022-01-10Prepare for release 0.9.5.Lazaro Clapp
2022-01-10Better fix for crash on member selects inside module-info.java (#544)Manu Sridharan
Now, in `matchMemberSelectTree()`, we check if the `MemberSelectTree` represents a reference to a module. If it does, we do not check if its base expression could be `null`. This change gives us a stronger invariant in `mayBeNullExpr()`: any `IdentifierTree` or `MemberSelectTree` passed to `mayBeNullExpr()` should have a non-null symbol. We explicitly check this to help us flag any future weird cases more easily. Unfortunately, to maintain JDK 8 compatibility, the check for whether a `MemberSelectTree` represents a module requires reflection. Testing did not reveal any significant performance impact. If / when NullAway requires JDK 11, we can and should get rid of the reflection. Code coverage is reduced due to the new runtime checks for (hopefully) impossible cases in `mayBeNullExpr()`. Fixes #533
2022-01-10Add comment in switch expression tests (#545)Manu Sridharan
Follow up to #543, see https://github.com/uber/NullAway/pull/543#discussion_r780827207
2022-01-09Fix crash with switch expression as a lambda body (#543)Manu Sridharan
Fixes #524 Fixed by bumping Checker Framework version
2022-01-06Add test case for unsound map reassignment handling (#541)Manu Sridharan
It might be useful to have a suite of test cases showing where NullAway is unsound, for documentation purposes. Here I just add one for re-assigning a `Map` variable, but we could easily add more in the future.
2022-01-06Add task to run NullAway on itself (#542)Manu Sridharan
The task can be run as `./gradlew :nullaway:buildWithNullAway`. This turned out to be less challenging than I expected. Unfortunately, the NullAway implementation does not yet pass NullAway; we will need to address that before running this task on CI. The task only gets created when building on JDK 11+; for reasons I don't understand, the task fails to configure on JDK 8.
2022-01-03Bump AutoValue and AutoService versions (#538)Manu Sridharan
A key benefit here is that these recent versions support Gradle incremental compilation.
2021-12-29Bump Guava dependency to 24.1.1 (#536)Lázaro Clapp
This is needed, as previous versions of Guava are subject to CVE-2018-10237. Note that the vulnerability occurs when decerializing untrusted data. As such, it is hard to imagine a case where NullAway would be directly exploitable, but we still shouldn't be asking build systems to resolve a known-vulnerable version of the library. Also, I'd love to bump Guava to a more modern version, but internally we still need to be able to work with Guava 24.1.1, so setting that as the minimum version seems the safest course of action right now.
2021-12-28Prepare next development version.Lazaro Clapp
2021-12-28Prepare for release 0.9.4.Lazaro Clapp
2021-12-28Fix crash with fully-qualified names in module-info.java import (#534)Manu Sridharan
Fixes #533 We had no tests before for a `module-info.java` file, so we missed this regression.
2021-12-27Prepare next development version.Lazaro Clapp
2021-12-27Prepare for release 0.9.3.Lazaro Clapp
2021-12-27Add JarInfer models for Android SDK 31 (Android 12) (#532)Lázaro Clapp
Generated based on AOSP tag android-12.0.0_r21. This required minor changes to the RELEASING.md process and our scripts, to account for changes in AOSP's build output structure. Additionally, this PR includes a minor fix for the JarInfer driver, which moves return-value inference code to the same try-catch block for Wala IR generation errors as the parameter nullability inference code, as well as a small refactoring and clarification of the parameter nullability inference code.
2021-12-27Update to Gradle 7.3.3 (#530)Manu Sridharan
2021-12-23Changes to avoid re-running Gradle tasks unnecessarily (#528)Manu Sridharan
Two changes here: * Add an `archiveClassifier` for the `:jar-infer:jar-infer-cli:jar` task, so that its output isn't the exact same file as the `shadowJar` task. Before, the tasks would overwrite each other's outputs, forcing the tasks to re-run. * Remove the `Build-Timestamp` from the `:jar-infer:test-java-lib-jarinfer:jar` output, as it forced the jar to be re-generated every time. With these changes, many fewer JarInfer-related Gradle tasks are re-run unnecessarily.
2021-12-23Support for Coveralls on multiple modules (#521)Manu Sridharan
Support is based on the official example from the Gradle documentation: https://docs.gradle.org/current/samples/sample_jvm_multi_project_with_code_coverage.html The overall coverage percentage goes down with this PR, since we are measuring on new code that had lower coverage beforehand. After this PR lands, though, the relative comparisons that Coveralls performs should be accurate. After this change, you can run `./gradlew codeCoverageReport` and then `open code-coverage-report/build/reports/jacoco/codeCoverageReport/html/index.html` to see the coverage report locally.
2021-12-23Add tests for JDK 16+ records (#527)Manu Sridharan
2021-12-22Pull jmh Gradle plugin version to top level (#526)Manu Sridharan
This better matches how we list versions for other plugins.
2021-12-22Test that DummyOptionsConfig's methods throw IllegalStateException (#525)Lázaro Clapp
By design, this class is intended to fail whenever called, as an instance will only be generated when failing to produce an instance of `ErrorProneCLIFlagsConfig`. See the javadoc documentation on `DummyOptionsConfig` itself as to why the class is needed to build NullAway. Since we want NullAway to fail fast if this dummy options object is ever passed, we test that all declared methods in the class throw an exception if ever called. Our test uses reflection to account for future methods being added to the `Config` interface.
2021-12-22Make jar-infer-lib tests pass on JDK 11 (#523)Manu Sridharan
Mostly, remove usage of internal APIs
2021-12-22Adds custom Nullable Annotation via Error Prone CLI flags (#522)Nima Karimipour
This PR adds the ability to configure additional custom `@Nullable/@Nonnull` annotations. In particular, this adds the following configuration options to NullAway: ``` -XepOpt:NullAway:CustomNullableAnnotations=[...] -XepOpt:NullAway:CustomNonnullAnnotations=[...] ``` Each of these options takes a comma-separated list of fully qualified annotation names, which NullAway should regard as nullable and non-null annotations (respectively), in *addition* to those it looks for by default. Neither configuration option is required when all relevant nullability annotations follow the conventions NullAway already expects (e.g. simple name `@Nullable` or `@NonNull` or any of our default supported annotations such as `@CheckForNull`). During auto-annotation testing, we have encountered a few projects which are partially annotated with nullability annotations with different simple names than the conventional `@Nullable` or `@NonNull` (and recognized variations, such as `@NotNull`). For example, [LibGdx](https://github.com/libgdx/libgdx) uses [@com.badlogic.gdx.utils.Null](https://github.com/libgdx/libgdx/blob/master/gdx/src/com/badlogic/gdx/utils/Null.java). This is a custom nullability annotation which lives within the project itself and doesn't use the `@Nullable` simple name convention. Rather than explicitly encoding every such annotation in existence into our defaults, this PR allows supporting such cases with a simple configuration change.