[
https://issues.apache.org/jira/browse/FLINK-6079?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15958685#comment-15958685
]
ASF GitHub Bot commented on FLINK-6079:
---------------------------------------
GitHub user zentol opened a pull request:
https://github.com/apache/flink/pull/3685
[FLINK-6079] [kafka] Provide meaningful error message if TopicPartitions
are null
This PR verifies that the List of topicPartitions returned by the
`FlinKKafkaConsumerBase#getKafkaPartitions()` isn't null. I'm assuming this
only happens when a sub-class isn't implemented correctly, as all
implementations pass a non-null list. (Even the dummies pass an empty list)
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/zentol/flink 6079_kafka_bull
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/flink/pull/3685.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 #3685
----
commit 29d59776e2fdd626be0a9315aa79f5c08a25bb58
Author: zentol <[email protected]>
Date: 2017-04-06T09:55:29Z
[FLINK-6079] [kafka] Provide meaningful error message if TopicPartitions
are null
----
> Ineffective null check in FlinkKafkaConsumerBase#open()
> -------------------------------------------------------
>
> Key: FLINK-6079
> URL: https://issues.apache.org/jira/browse/FLINK-6079
> Project: Flink
> Issue Type: Bug
> Components: Kafka Connector
> Reporter: Ted Yu
> Assignee: Chesnay Schepler
> Priority: Minor
>
> Here is related code:
> {code}
> List<KafkaTopicPartition> kafkaTopicPartitions =
> getKafkaPartitions(topics);
> subscribedPartitionsToStartOffsets = new
> HashMap<>(kafkaTopicPartitions.size());
> if (kafkaTopicPartitions != null) {
> {code}
> Prior to the null check, kafkaTopicPartitions is already dereferenced.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)