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 2021/01/05 19:56:19 UTC

[GitHub] [pulsar] sijie commented on a change in pull request #9131: Issue 9130: Pulsar-admin sinks create: bad error message "java.lang.NullPointerException: path is 'null'." in case of missing "--name" parameter

sijie commented on a change in pull request #9131:
URL: https://github.com/apache/pulsar/pull/9131#discussion_r552160130



##########
File path: pulsar-client-admin/src/main/java/org/apache/pulsar/client/admin/internal/SinksImpl.java
##########
@@ -232,6 +233,10 @@ public void createSink(SinkConfig sinkConfig, String fileName) throws PulsarAdmi
     @Override
     public CompletableFuture<Void> createSinkAsync(SinkConfig sinkConfig, String fileName) {
         final CompletableFuture<Void> future = new CompletableFuture<>();
+        if (StringUtils.isBlank(sinkConfig.getName())) {

Review comment:
       Don't we need a better story here to validate the parameters? For example, what if tenant or namespace is null?




----------------------------------------------------------------
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.

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