Github user StephanEwen commented on a diff in the pull request:

    https://github.com/apache/flink/pull/3001#discussion_r92366454
  
    --- Diff: 
flink-connectors/flink-connector-kinesis/src/main/java/org/apache/flink/streaming/connectors/kinesis/FlinkKinesisConsumer.java
 ---
    @@ -267,20 +269,20 @@ public void close() throws Exception {
        // 
------------------------------------------------------------------------
     
        @Override
    -   public HashMap<KinesisStreamShard, SequenceNumber> snapshotState(long 
checkpointId, long checkpointTimestamp) throws Exception {
    +   public List<Tuple2<KinesisStreamShard, SequenceNumber>> 
snapshotState(long checkpointId, long checkpointTimestamp) throws Exception {
                if (lastStateSnapshot == null) {
                        LOG.debug("snapshotState() requested on not yet opened 
source; returning null.");
    -                   return null;
    +                   return new ArrayList<>();
    --- End diff --
    
    Its good style to avoid creating empty lists. Use `Collections.emptyList()` 
instead.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to