Skip to content

Commit 1d93244

Browse files
committed
spotless apply
1 parent cf3a2f7 commit 1d93244

File tree

3 files changed

+10
-11
lines changed

3 files changed

+10
-11
lines changed

flink-connector-kafka/src/main/java/org/apache/flink/streaming/connectors/kafka/table/DynamicKafkaRecordSerializationSchema.java

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -192,9 +192,7 @@ private String getTargetTopic(RowData element) {
192192
}
193193

194194
private boolean cachedTopicPatternMatch(String topic) {
195-
return topicPatternMatches.computeIfAbsent(
196-
topic,
197-
t -> topicPattern.matcher(t).matches());
195+
return topicPatternMatches.computeIfAbsent(topic, t -> topicPattern.matcher(t).matches());
198196
}
199197

200198
private Integer extractPartition(
@@ -205,11 +203,7 @@ private Integer extractPartition(
205203
int[] partitions) {
206204
if (partitioner != null) {
207205
return partitioner.partition(
208-
consumedRow,
209-
keySerialized,
210-
valueSerialized,
211-
targetTopic,
212-
partitions);
206+
consumedRow, keySerialized, valueSerialized, targetTopic, partitions);
213207
}
214208
return null;
215209
}

flink-connector-kafka/src/test/java/org/apache/flink/streaming/connectors/kafka/table/DynamicKafkaRecordSerializationSchemaTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@ public void testInvalidTopicMetadata(
5959
private static Stream<Arguments> provideTopicMetadataTestParameters() {
6060
String topic1 = "topic1";
6161
return Stream.of(
62-
Arguments.of(Collections.singletonList(SINGLE_TOPIC), null, SINGLE_TOPIC, SINGLE_TOPIC),
62+
Arguments.of(
63+
Collections.singletonList(SINGLE_TOPIC), null, SINGLE_TOPIC, SINGLE_TOPIC),
6364
Arguments.of(Collections.singletonList(SINGLE_TOPIC), null, topic1, SINGLE_TOPIC),
6465
Arguments.of(Collections.singletonList(SINGLE_TOPIC), null, null, SINGLE_TOPIC),
6566
Arguments.of(MULTIPLE_TOPICS, null, topic1, topic1),

flink-connector-kafka/src/test/java/org/apache/flink/streaming/connectors/kafka/table/KafkaTableITCase.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,9 @@ public void testKafkaSourceSinkWithTopicList() throws Exception {
235235
List<Row> results = collectAllRows(tEnv.sqlQuery("SELECT * from kafka"));
236236

237237
assertThat(results)
238-
.containsExactly(Row.of(topic1, 1, 1102, "behavior 1"), Row.of(topic2, 2, 1103, "behavior 2"));
238+
.containsExactly(
239+
Row.of(topic1, 1, 1102, "behavior 1"),
240+
Row.of(topic2, 2, 1103, "behavior 2"));
239241

240242
// ------------- cleanup -------------------
241243

@@ -290,7 +292,9 @@ public void testKafkaSourceSinkWithTopicPattern() throws Exception {
290292
List<Row> results = collectAllRows(tEnv.sqlQuery("SELECT * from kafka"));
291293

292294
assertThat(results)
293-
.containsExactly(Row.of(topic1, 1, 1102, "behavior 1"), Row.of(topic2, 2, 1103, "behavior 2"));
295+
.containsExactly(
296+
Row.of(topic1, 1, 1102, "behavior 1"),
297+
Row.of(topic2, 2, 1103, "behavior 2"));
294298

295299
// ------------- cleanup -------------------
296300

0 commit comments

Comments
 (0)