Denovo1998 commented on code in PR #17449:
URL: https://github.com/apache/pulsar/pull/17449#discussion_r1092827614
##########
pulsar-common/src/main/java/org/apache/pulsar/common/protocol/Commands.java:
##########
@@ -801,6 +805,20 @@ private static void convertSchema(SchemaInfo schemaInfo,
Schema schema) {
});
}
+ private static void convertAutoConsumeSchema(SchemaInfo schemaInfo, Schema
schema) {
+ schema.setName(schemaInfo.getName())
+ .setSchemaData(schemaInfo.getSchema())
+ .setType(Schema.Type.AutoConsume);
Review Comment:
How about we do it this way?
```java
private static void convertAutoConsumeSchema(SchemaInfo schemaInfo,
Schema schema) {
convertSchema(schemaInfo, schema);
schema.setType(Schema.Type.AutoConsume);
}
```
`getSchemaType` is a public method. And `SchemaType` is also public. It's
better not to change.
--
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]