You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/10/09 00:59:37 UTC

[GitHub] [pulsar] codelipenghui commented on a diff in pull request #17948: [improve][java-client][issue-17931]Refactor SchemaHash to reduce call of hashFunction in SchemaHash

codelipenghui commented on code in PR #17948:
URL: https://github.com/apache/pulsar/pull/17948#discussion_r990714308


##########
pulsar-client/src/main/java/org/apache/pulsar/client/impl/schema/BooleanSchema.java:
##########
@@ -32,10 +32,10 @@ public class BooleanSchema extends AbstractSchema<Boolean> {
     private static final SchemaInfo SCHEMA_INFO;
 
     static {
-        SCHEMA_INFO = new SchemaInfoImpl()
-                .setName("Boolean")
-                .setType(SchemaType.BOOLEAN)
-                .setSchema(new byte[0]);
+        SCHEMA_INFO = SchemaInfoImpl.builder()
+                .name("Boolean")
+                .type(SchemaType.BOOLEAN)
+                .schema(new byte[0]).build();

Review Comment:
   The class `SchemaInfoImpl` is a stable API, we can't change the existing API.
   
   Please check the annotations of the class `SchemaInfoImpl`
   
   ```
   @InterfaceAudience.Public
   @InterfaceStability.Stable
   ```



-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org