Skip to content

Commit e2862a0

Browse files
Minor code cleanup (#3771)
* Remove unnecessary null check in Suffixer class Signed-off-by: Tran Ngoc Nhan <[email protected]>
1 parent 94906df commit e2862a0

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

spring-kafka/src/main/java/org/springframework/kafka/annotation/DltHandler.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2018-2023 the original author or authors.
2+
* Copyright 2018-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -14,9 +14,6 @@
1414
* limitations under the License.
1515
*/
1616

17-
/**
18-
* das
19-
*/
2017
package org.springframework.kafka.annotation;
2118

2219

spring-kafka/src/main/java/org/springframework/kafka/support/Suffixer.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2018-2024 the original author or authors.
2+
* Copyright 2018-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -26,6 +26,7 @@
2626
* Utility class that suffixes strings.
2727
*
2828
* @author Tomaz Fernandes
29+
* @author Ngoc Nhan
2930
* @since 2.7
3031
*
3132
*/
@@ -42,7 +43,7 @@ public String maybeAddTo(String source) {
4243
if (!StringUtils.hasText(this.suffix)) {
4344
return source;
4445
}
45-
return source != null && StringUtils.hasText(source) // Only suffix if there's text
46+
return StringUtils.hasText(source) // Only suffix if there's text
4647
? source.concat(this.suffix)
4748
: source;
4849
}

0 commit comments

Comments
 (0)