sjvanrossum commented on code in PR #32406:
URL: https://github.com/apache/beam/pull/32406#discussion_r1840321265


##########
sdks/java/io/solace/src/main/java/org/apache/beam/sdk/io/solace/broker/JcsmpSessionService.java:
##########
@@ -149,10 +127,9 @@ private MessageReceiver createFlowReceiver() throws 
JCSMPException, IOException
     if (isClosed()) {
       connectSession();
     }
+    Queue queueNotNull = checkStateNotNull(queue(), "SolaceIO.Read: Queue is 
not set.");
 
-    Queue queue =
-        JCSMPFactory.onlyInstance()
-            .createQueue(checkStateNotNull(queueName(), "SolaceIO.Read: Queue 
is not set."));
+    Queue queue = 
JCSMPFactory.onlyInstance().createQueue(queueNotNull.getName());

Review Comment:
   This doesn't seem quite right, you already have a `Queue` instance at this 
point, what's the point of having the factory recreate it?



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