Use generics in IoTControlManager

This commit is contained in:
Florian Schmaus 2016-08-09 17:46:29 +02:00
parent 88bf2528a2
commit 0a96016727
2 changed files with 2 additions and 2 deletions

View File

@ -123,7 +123,7 @@ public final class IoTControlManager extends Manager {
* @throws NotConnectedException * @throws NotConnectedException
* @throws InterruptedException * @throws InterruptedException
*/ */
public IoTSetResponse setUsingIq(FullJid jid, Collection<SetData> data) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { public IoTSetResponse setUsingIq(FullJid jid, Collection<? extends SetData> data) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
IoTSetRequest request = new IoTSetRequest(data); IoTSetRequest request = new IoTSetRequest(data);
request.setTo(jid); request.setTo(jid);
IoTSetResponse response = connection().createPacketCollectorAndSend(request).nextResultOrThrow(); IoTSetResponse response = connection().createPacketCollectorAndSend(request).nextResultOrThrow();

View File

@ -28,7 +28,7 @@ public class IoTSetRequest extends IQ {
private final Collection<SetData> setData; private final Collection<SetData> setData;
public IoTSetRequest(Collection<SetData> setData) { public IoTSetRequest(Collection<? extends SetData> setData) {
super(ELEMENT, NAMESPACE); super(ELEMENT, NAMESPACE);
setType(Type.set); setType(Type.set);
this.setData = Collections.unmodifiableCollection(setData); this.setData = Collections.unmodifiableCollection(setData);