You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2017/11/07 18:22:00 UTC
[jira] [Commented] (KAFKA-6180) AbstractConfig.getList() should
never return null
[ https://issues.apache.org/jira/browse/KAFKA-6180?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16242570#comment-16242570 ]
ASF GitHub Bot commented on KAFKA-6180:
---------------------------------------
GitHub user lahabana opened a pull request:
https://github.com/apache/kafka/pull/4188
KAFKA-6180: AbstractConfig.getList() should never return null
Return an empty list instead of null to make handling these easier
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/lahabana/kafka kafka6180
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/kafka/pull/4188.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #4188
----
commit a5ef570a5ee472c52b7adfd20c2cc315008fad48
Author: cmolter <cm...@apple.com>
Date: 2017-11-07T18:18:47Z
KAFKA-6180: AbstractConfig.getList() should never return null
Return an empty list instead of null to make handling these easier
----
> AbstractConfig.getList() should never return null
> -------------------------------------------------
>
> 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
> 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.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)