[jboss-jira] [JBoss JIRA] (JGRP-1988) MessageDispatcher::sendMessageWithFuture with RequestOptions null

Bela Ban (JIRA) issues at jboss.org
Wed Nov 25 06:32:00 EST 2015


    [ https://issues.jboss.org/browse/JGRP-1988?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13133694#comment-13133694 ] 

Bela Ban commented on JGRP-1988:
--------------------------------

I fixed this by providing a SYNC RequestOptions argument when null. I also issue a warning null options are almost certainly not what the caller wanted.

> MessageDispatcher::sendMessageWithFuture with RequestOptions null
> -----------------------------------------------------------------
>
>                 Key: JGRP-1988
>                 URL: https://issues.jboss.org/browse/JGRP-1988
>             Project: JGroups
>          Issue Type: Enhancement
>    Affects Versions: 3.6.6
>            Reporter: matias sm
>            Assignee: Bela Ban
>            Priority: Minor
>             Fix For: 3.6.7
>
>
> In MessageDispatcher::sendMessageWithFuture there are some validations to check the case of RequestOptions options being null. However, if one calls that method with a null RequestOptions argument, the execution ends in failure (with a NPE in the resulting future) [1].
> The point is, either the validations are unnecessary and should exist a preconditions check at the beginning of the method, or it should set a (documented) default RequestOptions so the sending can be completed.
> [1] the source of the NPE is UnicastRequest::sendRequest when trying to access the RequestOptions's getMode method.



--
This message was sent by Atlassian JIRA
(v6.4.11#64026)


More information about the jboss-jira mailing list