Skip to content

Commit 36cc1c4

Browse files
Ashok BAshok B
authored andcommitted
Fix checkstyle: Move ternary operator to new line per code style rules
1 parent 2ba01b5 commit 36cc1c4

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

api/src/main/java/io/kafbat/ui/serdes/builtin/sr/SchemaRegistrySerde.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -246,8 +246,9 @@ private String schemaSubject(String topic, Target type) {
246246
// Transform topic name from {env}.{topic_name} to {topic_name}
247247
// Example: "development.integration_events.connection_management.entities.connection"
248248
// becomes "integration_events.connection_management.entities.connection"
249-
String transformedTopic = topic.contains(".") ?
250-
topic.substring(topic.indexOf(".") + 1) : topic;
249+
String transformedTopic = topic.contains(".")
250+
? topic.substring(topic.indexOf(".") + 1)
251+
: topic;
251252

252253
// Apply the schema naming template with the transformed topic name
253254
return String.format(type == Target.KEY ? keySchemaNameTemplate : valueSchemaNameTemplate, transformedTopic);

api/src/main/java/io/kafbat/ui/service/integration/odd/TopicsExporter.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,9 @@ private Mono<List<DataSetField>> getTopicSchema(KafkaCluster cluster,
106106
// Transform topic name from {env}.{topic_name} to {topic_name}
107107
// Example: "development.integration_events.connection_management.entities.connection"
108108
// becomes "integration_events.connection_management.entities.connection"
109-
String transformedTopic = topic.contains(".") ?
110-
topic.substring(topic.indexOf(".") + 1) : topic;
109+
String transformedTopic = topic.contains(".")
110+
? topic.substring(topic.indexOf(".") + 1)
111+
: topic;
111112
String subject = transformedTopic + (isKey ? "-key" : "-value");
112113
return getSubjWithResolvedRefs(cluster, subject)
113114
.map(t -> DataSetFieldsExtractors.extract(t.getT1(), t.getT2(), topicOddrn, isKey))

0 commit comments

Comments
 (0)