Denovo1998 commented on code in PR #25015:
URL: https://github.com/apache/pulsar/pull/25015#discussion_r2559945383


##########
pulsar-client/src/main/java/org/apache/pulsar/client/impl/schema/AutoProduceBytesSchema.java:
##########
@@ -49,6 +49,12 @@ public AutoProduceBytesSchema(Schema<T> schema) {
                                        && schemaInfo.getType() != 
SchemaType.NONE;
     }
 
+    private AutoProduceBytesSchema(AutoProduceBytesSchema<T> other) {
+        this.schema = other.schema;

Review Comment:
   @lhotari 
   ```java
   this.schema = other.schema != null ? other.schema.clone() : null;
   ```
   Compared to the previous implementation, the new clone() no longer clones 
the underlying schema instance but shares the reference instead.
   If we want to preserve the previous deep-clone semantics, we might consider 
calling other.schema.clone() in the copy constructor when schema != null, but I 
don't think this is required for this fix.
   



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