You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Julian Hyde (Jira)" <ji...@apache.org> on 2024/08/28 16:54:00 UTC
[jira] [Commented] (CALCITE-6552) Enable CheckerFramework in 'server' module
[ https://issues.apache.org/jira/browse/CALCITE-6552?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17877469#comment-17877469 ]
Julian Hyde commented on CALCITE-6552:
--------------------------------------
I logged CALCITE-6553 for some remaining work (TODOs that I added to ServerDdlExecutor).
> Enable CheckerFramework in 'server' module
> ------------------------------------------
>
> Key: CALCITE-6552
> URL: https://issues.apache.org/jira/browse/CALCITE-6552
> Project: Calcite
> Issue Type: Improvement
> Reporter: Julian Hyde
> Assignee: Julian Hyde
> Priority: Major
> Labels: pull-request-available
> Fix For: 1.38.0
>
>
> In CALCITE-4199 we enabled CheckerFramework (via annotations and CI jobs) in the 'core' and 'linq4j' modules; this change further enables CheckerFramework in the 'server' module, and fixes all violations.
> There are also a large number of 'cosmetic' modifications to improve code quality without changing behavior, including:
> * Replace '{{this.x = x; assert x != null;}}' by '{{this.x = requireNonNull\(x);}}' in constructors
> * Replace {{assert}} in other code locations where it implements an invariant. We don't use {{requireNonNull}} because it throws {{NullPointerException}}; we would prefer to throw {{AssertionError}} or {{IllegalStateException}}
> * Replace {{x.equals("")}} and {{x.size() == 0}} with {{x.isEmpty()}}
> * Make fields {{final}} where possible
> * Make private methods and inner classes {{static}} where possible
> * In {{class Pair<K, V>}} make the type variables {{K}} and {{V}} no longer {{@Nullable}} by default (you can make each of them nullable if you need)
--
This message was sent by Atlassian Jira
(v8.20.10#820010)