eolivelli commented on a change in pull request #12937:
URL: https://github.com/apache/pulsar/pull/12937#discussion_r755010044
##########
File path:
pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/rest/api/SinksImpl.java
##########
@@ -744,6 +745,9 @@ public SinkConfig getSinkInfo(final String tenant,
SinkConfigUtils.ExtractedSinkDetails sinkDetails =
SinkConfigUtils.validateAndExtractDetails(
sinkConfig, classLoader,
worker().getWorkerConfig().getValidateConnectorConfig());
+ if (classLoader instanceof URLClassLoader) {
Review comment:
What about creating a utility method in some 'common' package.
I would also use Closeable and not URLClassloader
##########
File path:
pulsar-functions/runtime/src/main/java/org/apache/pulsar/functions/runtime/thread/ThreadRuntime.java
##########
@@ -149,7 +149,7 @@ private static ClassLoader loadJars(String jarFile,
} catch (FileNotFoundException e) {
// this is usually like
// java.io.FileNotFoundException:
/tmp/pulsar-nar/xxx.jar-unpacked/xxxxx/META-INF/MANIFEST.MF'
- log.error("The file {} does not look like a .nar file",
jarFile, e.toString());
Review comment:
No need to dump the stack trace hereit was using toString intentionally
Otherwise the stacktracd will scare sys admins
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]