eolivelli commented on a change in pull request #9343:
URL: https://github.com/apache/pulsar/pull/9343#discussion_r565878943
##########
File path:
pulsar-client-api/src/main/java/org/apache/pulsar/client/api/schema/RecordSchemaBuilder.java
##########
@@ -54,7 +54,17 @@
* @param genericSchema schema of the field
* @return field schema builder to build the field.
*/
- FieldSchemaBuilder field(String fieldName, GenericSchema genericSchema);
+ FieldSchemaBuilder field(String fieldName,
org.apache.pulsar.client.api.Schema<?> genericSchema);
+
+ /**
+ * Add a field with the given name and genericSchema to the record.
+ *
+ * @param fieldName name of the field
+ * @param genericSchema schema of the field
+ * @return field schema builder to build the field.
+ */
+ @Deprecated
+ FieldSchemaBuilder field(String fieldName, GenericSchema<?> genericSchema);
Review comment:
I have deprecated it in favour of the new method that allows a
`Schema<?>`
the new method is more general, and it should be preferred.
I cannot remove the one with `GenericSchema<?>` in order to keep binary
compatibility with compiled code
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]