sijie closed pull request #1883: All user supplied arguments have to be 
properly typed
URL: https://github.com/apache/incubator-pulsar/pull/1883
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/pulsar-functions/instance/src/main/python/contextimpl.py 
b/pulsar-functions/instance/src/main/python/contextimpl.py
index dea4ca0220..35a5443b9e 100644
--- a/pulsar-functions/instance/src/main/python/contextimpl.py
+++ b/pulsar-functions/instance/src/main/python/contextimpl.py
@@ -121,6 +121,9 @@ def publish(self, topic_name, message):
     return self.publish(topic_name, message, "serde.IdentitySerDe")
 
   def publish(self, topic_name, message, serde_class_name):
+    # Just make sure that user supplied values are properly typed
+    topic_name = str(topic_name)
+    serde_class_name = str(serde_class_name)
     if topic_name not in self.publish_producers:
       self.publish_producers[topic_name] = self.pulsar_client.create_producer(
         topic_name,


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to