syhily commented on code in PR #19433:
URL: https://github.com/apache/flink/pull/19433#discussion_r861027392


##########
flink-connectors/flink-connector-pulsar/src/main/java/org/apache/flink/connector/pulsar/source/enumerator/subscriber/impl/BasePulsarSubscriber.java:
##########
@@ -63,18 +63,15 @@ protected List<TopicPartition> toTopicPartitions(
                     .map(range -> new TopicPartition(metadata.getName(), -1, 
range))
                     .collect(toList());
         } else {
-            return IntStream.range(0, metadata.getPartitionSize())
-                    .boxed()
-                    .flatMap(
-                            partitionId ->
-                                    ranges.stream()
-                                            .map(
-                                                    range ->
-                                                            new TopicPartition(
-                                                                    
metadata.getName(),
-                                                                    
partitionId,
-                                                                    range)))
-                    .collect(toList());
+            List<TopicPartition> partitions = new ArrayList<>();

Review Comment:
   This would make the code more readable because the lambda has been formatted 
in an ugly style.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to