BewareMyPower commented on code in PR #14626:
URL: https://github.com/apache/pulsar/pull/14626#discussion_r874375620


##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/ServerCnx.java:
##########
@@ -2027,6 +2027,11 @@ remoteAddress, new 
String(commandGetSchema.getSchemaVersion()),
         long requestId = commandGetSchema.getRequestId();
         SchemaVersion schemaVersion = SchemaVersion.Latest;
         if (commandGetSchema.hasSchemaVersion()) {
+            if (commandGetSchema.getSchemaVersion().length == 0) {
+                commandSender.sendGetSchemaErrorResponse(requestId, 
ServerError.IncompatibleSchema,
+                        "Empty schema version");
+                return;
+            }

Review Comment:
   When I debugged `testAvroSchemaWithTcpLookup` and 
`testAvroSchemaWithHttpLookup`, it never went here. Then I removed these lines, 
tests still passed.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to