[
https://issues.apache.org/jira/browse/FLINK-4053?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15351056#comment-15351056
]
ASF GitHub Bot commented on FLINK-4053:
---------------------------------------
Github user zentol commented on a diff in the pull request:
https://github.com/apache/flink/pull/2128#discussion_r68580911
--- Diff:
flink-streaming-connectors/flink-connector-rabbitmq/src/main/java/org/apache/flink/streaming/connectors/rabbitmq/RMQSink.java
---
@@ -76,6 +76,9 @@ public void open(Configuration config) throws Exception {
try {
connection = factory.newConnection();
channel = connection.createChannel();
+ if (channel == null) {
--- End diff --
Do you know under which circumstances this can occur and/or what a user can
do to resolve it?
> Return value from Connection should be checked against null
> -----------------------------------------------------------
>
> Key: FLINK-4053
> URL: https://issues.apache.org/jira/browse/FLINK-4053
> Project: Flink
> Issue Type: Bug
> Reporter: Ted Yu
> Assignee: Ivan Mushketyk
> Priority: Minor
>
> In RMQSource.java and RMQSink.java, there is code in the following pattern:
> {code}
> connection = factory.newConnection();
> channel = connection.createChannel();
> {code}
> According to
> https://www.rabbitmq.com/releases/rabbitmq-java-client/current-javadoc/com/rabbitmq/client/Connection.html#createChannel()
> :
> {code}
> Returns:
> a new channel descriptor, or null if none is available
> {code}
> The return value should be checked against null.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)