adrianiacobghiula commented on code in PR #24311:
URL: https://github.com/apache/pulsar/pull/24311#discussion_r2160309174


##########
pulsar-client/src/main/java/org/apache/pulsar/client/impl/schema/util/SchemaUtil.java:
##########
@@ -32,12 +32,16 @@
 
 public class SchemaUtil {
 
+    public static boolean DEFAULT_JSR310_CONVERSION_ENABLED = false;
+
     public static boolean getJsr310ConversionEnabledFromSchemaInfo(SchemaInfo 
schemaInfo) {
-        if (schemaInfo != null) {
-            return Boolean.parseBoolean(schemaInfo.getProperties()
-                    
.getOrDefault(SchemaDefinitionBuilderImpl.JSR310_CONVERSION_ENABLED, "false"));

Review Comment:
   Hi @codelipenghui,
   Thank you for having a look on my PR. the getOrDefault is not enough. I want 
to be able to override what the schema defines if the jsr310 conversion is or 
not enabled. The schema can come from an old producer, from a golang producer. 
In my code I want to be able to decide if my client is able to do the jsr310 
conversion and not the schema.  I added the tests :)



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