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/16 13:47:48 UTC
[GitHub] [pulsar] zzzming commented on a diff in pull request #16079: [improve][function] Allow not providing the class name when loading a Function nar file
zzzming commented on code in PR #16079:
URL: https://github.com/apache/pulsar/pull/16079#discussion_r899097641
##########
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:
Does it make sense to let Util.isFunctionPackageUrlSupported to evaluate if userCodeFile is null? So the function itself can defensively checking null object.
--
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