greyp9 commented on code in PR #7274:
URL: https://github.com/apache/nifi/pull/7274#discussion_r1210763330


##########
nifi-nar-bundles/nifi-gcp-bundle/nifi-gcp-processors/src/main/java/org/apache/nifi/processors/gcp/pubsub/PublishGCPubSub.java:
##########
@@ -137,9 +211,10 @@ public Set<Relationship> getRelationships() {
     @OnScheduled
     public void onScheduled(ProcessContext context) {
         try {
+            storedException.set(null);
             publisher = getPublisherBuilder(context).build();
         } catch (IOException e) {
-            getLogger().error("Failed to create Google Cloud PubSub Publisher 
due to {}", new Object[]{e});
+            getLogger().error("Failed to create Google Cloud PubSub Publisher 
due to {}", e);

Review Comment:
   I understand that an exception throw would result in the exception being 
logged, so going with a one-liner for clarity.



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

Reply via email to