[
https://issues.jboss.org/browse/JGRP-1141?page=com.atlassian.jira.plugin....
]
Bela Ban commented on JGRP-1141:
--------------------------------
The issue is that if we use generics, callers have to change
RspList rsps=disp.callXXX();
to
RspList<Object> rsps=...; // or the real type of the return value
The problem is that this doesn't add to type safety at compile time, e.g.
If we define RspList<Integer> rsps=disp.callRemoteMethods(...);
and get back a list of Strings, then
Integer val=rsps.getFirst(); // this will throw a ClassCastException
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