congbobo184 commented on pull request #14508: URL: https://github.com/apache/pulsar/pull/14508#issuecomment-1057650924
> > The problem with the other pull is that the AbstractSchema#clone() method does return the same instance, so the fix is not useful at all. > > I wonder why > > https://github.com/apache/pulsar/blob/16beb9d97fdc64092c8f3fe6959d6bf20dd0aa13/pulsar-client/src/main/java/org/apache/pulsar/client/impl/schema/AbstractSchema.java#L68-L70 > > doesn't implement clone? It seems really misleading to have such a method on the API if it's not doing what it's supposed to do. #6356 added the clone method. Perhaps @congbobo184 could explain the reasoning? There will be some components inside and will change. When the user wants to use the component at that time, we need the clone method to get the current schema, and it will not affect the original schema. Doesn't seem to be of much use in primitive schema as they are all the same -- 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]
