You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by "sjvanrossum (via GitHub)" <gi...@apache.org> on 2024/11/13 13:53:20 UTC
Re: [PR] SolaceIO: separate auth and session settings [beam]
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org