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 2022/06/17 07:36:09 UTC

[GitHub] [pulsar] cbornet commented on a diff in pull request #16079: [improve][function] Allow not providing the class name when loading a Function nar file

cbornet commented on code in PR #16079:
URL: https://github.com/apache/pulsar/pull/16079#discussion_r899847424


##########
pulsar-functions/localrun/src/main/java/org/apache/pulsar/functions/LocalRunner.java:
##########
@@ -345,23 +345,38 @@ public void start(boolean blocking) throws Exception {
                         functionDetails = FunctionConfigUtils.convert(
                                 functionConfig,
                                 FunctionConfigUtils.validateJavaFunction(functionConfig, builtInFunctionClassLoader));
-                    } else if (Utils.isFunctionPackageUrlSupported(userCodeFile)) {
+                    } else if (userCodeFile != null && Utils.isFunctionPackageUrlSupported(userCodeFile)) {

Review Comment:
   `isFunctionPackageUrlSupported ` is already defensive against null userCodeFile.
   IDEA just doesn't see it. I can remove the null-check and it will show the IDEA warning.
   WDYT ?



-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org