You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2019/02/19 06:07:34 UTC

[GitHub] jerrypeng commented on a change in pull request #3621: Fix stackoverflow issue with java function window context.

jerrypeng commented on a change in pull request #3621: Fix stackoverflow issue with java function window context.
URL: https://github.com/apache/pulsar/pull/3621#discussion_r257899991
 
 

 ##########
 File path: pulsar-functions/windowing/src/main/java/org/apache/pulsar/functions/windowing/WindowContextImpl.java
 ##########
 @@ -117,7 +117,10 @@ public ByteBuffer getState(String key) {
 
     @Override
     public String getUserConfigValue(String key) {
-        return this.getUserConfigValue(key);
+        if (this.context.getUserConfigValue(key).isPresent()) {
+            return this.context.getUserConfigValue(key).get().toString();
 
 Review comment:
   This API is actually incorrect. @cckellogg can you change the signature from returning a String to returning an Optional<Object> as this is the case for functions:
   
   https://github.com/apache/pulsar/blob/master/pulsar-functions/instance/src/main/java/org/apache/pulsar/functions/instance/ContextImpl.java#L238

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services