Skip to content

Commit c865308

Browse files
committed
Simplifying the code
1 parent adc205c commit c865308

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/main/java/tutorial/buildon/aws/streaming/kafka/MyFirstKafkaConnectorTask.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,11 @@ public List<SourceRecord> poll() throws InterruptedException {
5555
List<SourceRecord> records = new ArrayList<>();
5656
for (String source : sources) {
5757
log.info("Polling data from the source '" + source + "'");
58-
Struct struct = createStruct(recordSchema);
5958
records.add(new SourceRecord(
6059
Collections.singletonMap("source", source),
6160
Collections.singletonMap("offset", 0),
6261
source, null, null, null,
63-
recordSchema, struct));
62+
recordSchema, createStruct(recordSchema)));
6463
}
6564
return records;
6665
}

0 commit comments

Comments
 (0)