You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Jason Gustafson (JIRA)" <ji...@apache.org> on 2018/01/09 23:13:00 UTC

[jira] [Assigned] (KAFKA-6180) Add a Validator for NonNull configurations and remove redundant null checks on lists

     [ https://issues.apache.org/jira/browse/KAFKA-6180?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jason Gustafson reassigned KAFKA-6180:
--------------------------------------

    Assignee: Jason Gustafson

> Add a Validator for NonNull configurations and remove redundant null checks on lists
> ------------------------------------------------------------------------------------
>
>                 Key: KAFKA-6180
>                 URL: https://issues.apache.org/jira/browse/KAFKA-6180
>             Project: Kafka
>          Issue Type: Improvement
>          Components: config
>    Affects Versions: 0.10.1.0, 0.10.1.1, 0.10.2.0, 0.10.2.1, 0.11.0.0, 1.0.0
>            Reporter: Charly Molter
>            Assignee: Jason Gustafson
>            Priority: Trivial
>
> AbstractConfig.getList returns null if the property is unset and there's no default.
> This creates a lot of cases where we need to do null checks (and remember them).
> It's good practice to just return an empty list as usually code naturally handles empty lists.
> To do this we set the default on lists to be Collections.emptyList() and add a Validator to disallow null values.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)