This is an automated email from the ASF dual-hosted git repository.

xqhu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/beam.git


The following commit(s) were added to refs/heads/master by this push:
     new f5fb6cc67ce fix the version string checks in KafkaIO (#35703)
f5fb6cc67ce is described below

commit f5fb6cc67ceff3986700a53737080e73c10cc336
Author: liferoad <[email protected]>
AuthorDate: Sat Jul 26 20:29:30 2025 -0400

    fix the version string checks in KafkaIO (#35703)
    
    * fix: use Strings.isNullOrEmpty for version string checks in KafkaIO
    
    * fix: replace Strings.isNullOrEmpty with null and empty checks for version 
string validation in KafkaIO
---
 .../io/kafka/src/main/java/org/apache/beam/sdk/io/kafka/KafkaIO.java    | 2 ++
 1 file changed, 2 insertions(+)

diff --git 
a/sdks/java/io/kafka/src/main/java/org/apache/beam/sdk/io/kafka/KafkaIO.java 
b/sdks/java/io/kafka/src/main/java/org/apache/beam/sdk/io/kafka/KafkaIO.java
index e632a39a847..338ee59c380 100644
--- a/sdks/java/io/kafka/src/main/java/org/apache/beam/sdk/io/kafka/KafkaIO.java
+++ b/sdks/java/io/kafka/src/main/java/org/apache/beam/sdk/io/kafka/KafkaIO.java
@@ -1859,6 +1859,7 @@ public class KafkaIO {
                   .as(StreamingOptions.class)
                   .getUpdateCompatibilityVersion();
           if (requestedVersionString != null
+              && !requestedVersionString.isEmpty()
               && TransformUpgrader.compareVersions(requestedVersionString, 
"2.66.0") < 0) {
             // Use discouraged Impulse for backwards compatibility with 
previous released versions.
             output =
@@ -2831,6 +2832,7 @@ public class KafkaIO {
                 .as(StreamingOptions.class)
                 .getUpdateCompatibilityVersion();
         if (requestedVersionString != null
+            && !requestedVersionString.isEmpty()
             && TransformUpgrader.compareVersions(requestedVersionString, 
"2.60.0") < 0) {
           // Redistribute is not allowed with commits prior to 2.59.0, since 
there is a Reshuffle
           // prior to the redistribute. The reshuffle will occur before 
commits are offsetted and

Reply via email to