eolivelli commented on a change in pull request #11666:
URL: https://github.com/apache/pulsar/pull/11666#discussion_r689277408



##########
File path: 
pulsar-common/src/main/java/org/apache/pulsar/common/functions/Utils.java
##########
@@ -34,7 +36,9 @@
 
     public static boolean isFunctionPackageUrlSupported(String functionPkgUrl) 
{
         return isNotBlank(functionPkgUrl) && (functionPkgUrl.startsWith(HTTP)
-                || functionPkgUrl.startsWith(FILE));
+                || functionPkgUrl.startsWith(FILE)
+                || Arrays.stream(PackageType.values()).anyMatch(type -> 
functionPkgUrl.startsWith(type.toString()))

Review comment:
       can we create an utility method ? this code looks duplicated




-- 
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-unsubscr...@pulsar.apache.org

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


Reply via email to