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 03:14:51 UTC

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

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


##########
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:
   OK. I have updated to keep the `SchemaInfoImpl` be Stable. 
   But this change, from `new SchemaInfoImpl()` to `SchemaInfoImpl.builder()` is necessary I think



-- 
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