Vladimir Sitnikov created CALCITE-7954:
------------------------------------------

             Summary: Annotate Avatica with JSpecify and check its nullness 
with NullAway
                 Key: CALCITE-7954
                 URL: https://issues.apache.org/jira/browse/CALCITE-7954
             Project: Calcite
          Issue Type: Improvement
          Components: avatica
            Reporter: Vladimir Sitnikov


CALCITE-7736 moves Calcite to JSpecify nullness annotations and checks them 
with NullAway. Avatica has neither: at commit 22379c3b4 of calcite-avatica 
main, no Java source carries a nullness annotation, and the build runs no 
nullness checker. {{org.checkerframework:checker-qual}} appears only as a 
constraint in {{bom/build.gradle.kts}}.

Calcite extends Avatica classes and calls their methods, for example 
{{CalciteMetaImpl extends MetaImpl}}. NullAway treats unannotated Avatica code 
as unchecked, so it reports no nullness errors where Calcite passes values to 
Avatica or reads values from it.

The change mirrors CALCITE-7736:
* declare {{org.jspecify:jspecify}} as an API dependency of the published 
modules;
* mark the packages {{@NullMarked}} and annotate the types that can hold null;
* run Error Prone with NullAway in a CI job.

Avatica targets Java 8, so it hits the same {{@Target(MODULE)}} problem as 
Calcite; CALCITE-7947 describes Calcite's workaround.

Ruben suggested this ticket in the review of CALCITE-7736: 
https://github.com/apache/calcite/pull/5213#issuecomment-7098294430




--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to