[jboss-jira] [JBoss JIRA] Commented: (JGRP-1141) RspList: use generics

Bela Ban (JIRA) jira-events at lists.jboss.org
Thu Apr 21 09:30:19 EDT 2011


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

Bela Ban commented on JGRP-1141:
--------------------------------

Rsp.getValue() returns T. However, if there is an exception, then casting getValue() to T would cause a ClassCastException !
Looks like we have to introduce an additional field 'exception' (of type Throable)...

Rsp.getValue() only returns values of type T. Rsp.getException() would return an exception if it occurred.

Probably need to add RspList.getExceptions() ...

> RspList: use generics
> ---------------------
>
>                 Key: JGRP-1141
>                 URL: https://issues.jboss.org/browse/JGRP-1141
>             Project: JGroups
>          Issue Type: Task
>            Reporter: Bela Ban
>            Assignee: Bela Ban
>            Priority: Minor
>             Fix For: 3.0
>
>
> e.g. RspList<Integer> list=disp.callRemoteMethods(....);
> for(Rsp<Ineteger> rsp: rsps) {
>      int counter=rsp.getValue();
> }

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the jboss-jira mailing list