Skip to content

Commit c5f2270

Browse files
committed
devices: remove casts to XBeeDevice class
- New extensions or layers of the XBee Java library (such as the XBee Library for Android) can add new devices extending the AbstractXBeeDevice class. This means that we cannot expect to always have an XBeeDevice object in internal constructors or methods of the library. Thus, all casts to XBeeDevice had to disappear. - In order to remove casts to XBeeDevice, most methods and constructors that where using an XBeeDevice as parameter had to change to AbstractXBeeDevice. XBeeDevice inherits from AbstractXBeeDevice, so there shouldn't be any problem with examples or code already written by clients. - Moved the class DataReader to the root path of the library so that it can access the protected method 'getNetwork()' of XBee devices. DataReader is an internal class used by the AbstractXBeeDevice one. So again, there shouldn't be any problem with code already written. - Added IllegalArgumentException to some methods and constructors that are now using the AbstractXBeeDevice as parameter when the AbstractXBeeDevice is a remote device. - Updated references in test cases. Signed-off-by: Diego Escalona <diego.escalona@digi.com>
1 parent 11c6576 commit c5f2270

31 files changed

+219
-216
lines changed

library/src/main/java/com/digi/xbee/api/AbstractXBeeDevice.java

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
import com.digi.xbee.api.connection.IConnectionInterface;
3131
import com.digi.xbee.api.connection.bluetooth.AbstractBluetoothInterface;
3232
import com.digi.xbee.api.connection.ConnectionType;
33-
import com.digi.xbee.api.connection.DataReader;
3433
import com.digi.xbee.api.connection.serial.SerialPortParameters;
3534
import com.digi.xbee.api.exceptions.ATCommandException;
3635
import com.digi.xbee.api.exceptions.BluetoothAuthenticationException;
@@ -211,8 +210,8 @@ public abstract class AbstractXBeeDevice {
211210
*
212211
* @see #AbstractXBeeDevice(IConnectionInterface)
213212
* @see #AbstractXBeeDevice(String, SerialPortParameters)
214-
* @see #AbstractXBeeDevice(XBeeDevice, XBee64BitAddress)
215-
* @see #AbstractXBeeDevice(XBeeDevice, XBee64BitAddress, XBee16BitAddress, String)
213+
* @see #AbstractXBeeDevice(AbstractXBeeDevice, XBee64BitAddress)
214+
* @see #AbstractXBeeDevice(AbstractXBeeDevice, XBee64BitAddress, XBee16BitAddress, String)
216215
* @see #AbstractXBeeDevice(String, int, int, int, int, int)
217216
*/
218217
public AbstractXBeeDevice(String port, int baudRate) {
@@ -240,8 +239,8 @@ public AbstractXBeeDevice(String port, int baudRate) {
240239
* @see #AbstractXBeeDevice(IConnectionInterface)
241240
* @see #AbstractXBeeDevice(String, int)
242241
* @see #AbstractXBeeDevice(String, SerialPortParameters)
243-
* @see #AbstractXBeeDevice(XBeeDevice, XBee64BitAddress)
244-
* @see #AbstractXBeeDevice(XBeeDevice, XBee64BitAddress, XBee16BitAddress, String)
242+
* @see #AbstractXBeeDevice(AbstractXBeeDevice, XBee64BitAddress)
243+
* @see #AbstractXBeeDevice(AbstractXBeeDevice, XBee64BitAddress, XBee16BitAddress, String)
245244
*/
246245
public AbstractXBeeDevice(String port, int baudRate, int dataBits, int stopBits, int parity, int flowControl) {
247246
this(port, new SerialPortParameters(baudRate, dataBits, stopBits, parity, flowControl));
@@ -259,8 +258,8 @@ public AbstractXBeeDevice(String port, int baudRate, int dataBits, int stopBits,
259258
*
260259
* @see #AbstractXBeeDevice(IConnectionInterface)
261260
* @see #AbstractXBeeDevice(String, int)
262-
* @see #AbstractXBeeDevice(XBeeDevice, XBee64BitAddress)
263-
* @see #AbstractXBeeDevice(XBeeDevice, XBee64BitAddress, XBee16BitAddress, String)
261+
* @see #AbstractXBeeDevice(AbstractXBeeDevice, XBee64BitAddress)
262+
* @see #AbstractXBeeDevice(AbstractXBeeDevice, XBee64BitAddress, XBee16BitAddress, String)
264263
* @see #AbstractXBeeDevice(String, int, int, int, int, int)
265264
* @see com.digi.xbee.api.connection.serial.SerialPortParameters
266265
*/
@@ -279,8 +278,8 @@ public AbstractXBeeDevice(String port, SerialPortParameters serialPortParameters
279278
*
280279
* @see #AbstractXBeeDevice(String, int)
281280
* @see #AbstractXBeeDevice(String, SerialPortParameters)
282-
* @see #AbstractXBeeDevice(XBeeDevice, XBee64BitAddress)
283-
* @see #AbstractXBeeDevice(XBeeDevice, XBee64BitAddress, XBee16BitAddress, String)
281+
* @see #AbstractXBeeDevice(AbstractXBeeDevice, XBee64BitAddress)
282+
* @see #AbstractXBeeDevice(AbstractXBeeDevice, XBee64BitAddress, XBee16BitAddress, String)
284283
* @see #AbstractXBeeDevice(String, int, int, int, int, int)
285284
* @see com.digi.xbee.api.connection.IConnectionInterface
286285
*/
@@ -311,11 +310,11 @@ public AbstractXBeeDevice(IConnectionInterface connectionInterface) {
311310
* @see #AbstractXBeeDevice(IConnectionInterface)
312311
* @see #AbstractXBeeDevice(String, int)
313312
* @see #AbstractXBeeDevice(String, SerialPortParameters)
314-
* @see #AbstractXBeeDevice(XBeeDevice, XBee64BitAddress, XBee16BitAddress, String)
313+
* @see #AbstractXBeeDevice(AbstractXBeeDevice, XBee64BitAddress, XBee16BitAddress, String)
315314
* @see #AbstractXBeeDevice(String, int, int, int, int, int)
316315
* @see com.digi.xbee.api.models.XBee16BitAddress
317316
*/
318-
public AbstractXBeeDevice(XBeeDevice localXBeeDevice, XBee64BitAddress addr64) {
317+
public AbstractXBeeDevice(AbstractXBeeDevice localXBeeDevice, XBee64BitAddress addr64) {
319318
this(localXBeeDevice, addr64, null, null);
320319
}
321320

@@ -340,12 +339,12 @@ public AbstractXBeeDevice(XBeeDevice localXBeeDevice, XBee64BitAddress addr64) {
340339
* @see #AbstractXBeeDevice(IConnectionInterface)
341340
* @see #AbstractXBeeDevice(String, int)
342341
* @see #AbstractXBeeDevice(String, SerialPortParameters)
343-
* @see #AbstractXBeeDevice(XBeeDevice, XBee64BitAddress)
342+
* @see #AbstractXBeeDevice(AbstractXBeeDevice, XBee64BitAddress)
344343
* @see #AbstractXBeeDevice(String, int, int, int, int, int)
345344
* @see com.digi.xbee.api.models.XBee16BitAddress
346345
* @see com.digi.xbee.api.models.XBee64BitAddress
347346
*/
348-
public AbstractXBeeDevice(XBeeDevice localXBeeDevice, XBee64BitAddress addr64,
347+
public AbstractXBeeDevice(AbstractXBeeDevice localXBeeDevice, XBee64BitAddress addr64,
349348
XBee16BitAddress addr16, String id) {
350349
if (localXBeeDevice == null)
351350
throw new NullPointerException("Local XBee device cannot be null.");
@@ -388,7 +387,7 @@ public AbstractXBeeDevice(XBeeDevice localXBeeDevice, XBee64BitAddress addr64,
388387
*
389388
* @since 1.2.1
390389
*/
391-
public AbstractXBeeDevice(XBeeDevice localXBeeDevice, Inet6Address ipv6Addr) {
390+
public AbstractXBeeDevice(AbstractXBeeDevice localXBeeDevice, Inet6Address ipv6Addr) {
392391
this(localXBeeDevice, ipv6Addr, null);
393392
}
394393

@@ -416,7 +415,7 @@ public AbstractXBeeDevice(XBeeDevice localXBeeDevice, Inet6Address ipv6Addr) {
416415
*
417416
* @since 1.2.1
418417
*/
419-
public AbstractXBeeDevice(XBeeDevice localXBeeDevice, Inet6Address ipv6Addr, String id) {
418+
public AbstractXBeeDevice(AbstractXBeeDevice localXBeeDevice, Inet6Address ipv6Addr, String id) {
420419
if (localXBeeDevice == null)
421420
throw new NullPointerException("Local XBee device cannot be null.");
422421
if (ipv6Addr == null)
@@ -3112,7 +3111,7 @@ protected void open() throws XBeeException {
31123111
logger.info(toString() + "Connection interface open.");
31133112

31143113
// Initialize the data reader.
3115-
dataReader = new DataReader(connectionInterface, operatingMode, (XBeeDevice)this);
3114+
dataReader = new DataReader(connectionInterface, operatingMode, this);
31163115
dataReader.start();
31173116

31183117
// Wait 10 milliseconds until the dataReader thread is started.
@@ -3132,7 +3131,7 @@ protected void open() throws XBeeException {
31323131
// Perform the Bluetooth authentication.
31333132
try {
31343133
logger.info(toString() + "Starting Bluetooth authentication...");
3135-
BluetoothAuthentication auth = new BluetoothAuthentication((XBeeDevice)this, bluetoothPassword);
3134+
BluetoothAuthentication auth = new BluetoothAuthentication(this, bluetoothPassword);
31363135
auth.authenticate();
31373136
((AbstractBluetoothInterface) connectionInterface).setEncryptionKeys(auth.getKey(), auth.getTxNonce(), auth.getRxNonce());
31383137
logger.info(toString() + "Authentication finished successfully.");
@@ -3313,7 +3312,7 @@ protected XBeeNetwork getNetwork() {
33133312
throw new InterfaceNotOpenException();
33143313

33153314
if (network == null)
3316-
network = new XBeeNetwork((XBeeDevice)this);
3315+
network = new XBeeNetwork(this);
33173316
return network;
33183317
}
33193318

@@ -4833,7 +4832,7 @@ private ExplicitXBeeMessage readExplicitDataPacket(RemoteXBeeDevice remoteXBeeDe
48334832
if (remoteXBeeDevice != null)
48344833
remoteDevice = remoteXBeeDevice;
48354834
else
4836-
remoteDevice = new RemoteXBeeDevice((XBeeDevice)this, explicitDataPacket.get64BitSourceAddress());
4835+
remoteDevice = new RemoteXBeeDevice(this, explicitDataPacket.get64BitSourceAddress());
48374836
getNetwork().addRemoteDevice(remoteDevice);
48384837
}
48394838
int sourceEndpoint = explicitDataPacket.getSourceEndpoint();

library/src/main/java/com/digi/xbee/api/BluetoothAuthentication.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ class BluetoothAuthentication {
6161
private static final int LENGTH_NONCE = 12;
6262

6363
// Variables.
64-
private final XBeeDevice device;
64+
private final AbstractXBeeDevice device;
6565
private final String password;
6666

6767
private final Object unlockLock = new Object();
@@ -82,10 +82,15 @@ class BluetoothAuthentication {
8282
* Class constructor. Instantiates a new {@code BluetoothAuthentication}
8383
* object with the given parameters.
8484
*
85+
* @throws IllegalArgumentException If {@code device.isRemote() == true}.
86+
*
8587
* @param device XBee device.
8688
* @param password Bluetooth password.
8789
*/
88-
BluetoothAuthentication(XBeeDevice device, String password) {
90+
BluetoothAuthentication(AbstractXBeeDevice device, String password) {
91+
if (device.isRemote())
92+
throw new IllegalArgumentException("The given local XBee device is remote.");
93+
8994
this.device = device;
9095
this.password = password;
9196

library/src/main/java/com/digi/xbee/api/connection/DataReader.java renamed to library/src/main/java/com/digi/xbee/api/DataReader.java

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
1414
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
1515
*/
16-
package com.digi.xbee.api.connection;
16+
package com.digi.xbee.api;
1717

1818
import java.io.IOException;
1919
import java.net.Inet6Address;
@@ -25,14 +25,7 @@
2525
import org.slf4j.Logger;
2626
import org.slf4j.LoggerFactory;
2727

28-
import com.digi.xbee.api.RemoteDigiMeshDevice;
29-
import com.digi.xbee.api.RemoteDigiPointDevice;
30-
import com.digi.xbee.api.RemoteRaw802Device;
31-
import com.digi.xbee.api.RemoteThreadDevice;
32-
import com.digi.xbee.api.RemoteXBeeDevice;
33-
import com.digi.xbee.api.RemoteZigBeeDevice;
34-
import com.digi.xbee.api.XBeeDevice;
35-
import com.digi.xbee.api.XBeeNetwork;
28+
import com.digi.xbee.api.connection.IConnectionInterface;
3629
import com.digi.xbee.api.exceptions.XBeeException;
3730
import com.digi.xbee.api.io.IOSample;
3831
import com.digi.xbee.api.listeners.IExplicitDataReceiveListener;
@@ -117,7 +110,7 @@ public class DataReader extends Thread {
117110

118111
private XBeePacketsQueue xbeePacketsQueue;
119112

120-
private XBeeDevice xbeeDevice;
113+
private AbstractXBeeDevice xbeeDevice;
121114

122115
/**
123116
* Class constructor. Instantiates a new {@code DataReader} object for the
@@ -131,16 +124,19 @@ public class DataReader extends Thread {
131124
*
132125
* @throws NullPointerException if {@code connectionInterface == null} or
133126
* {@code mode == null}.
127+
* @throws IllegalArgumentException If {@code xbeeDevice.isRemote() == true}.
134128
*
135129
* @see IConnectionInterface
136130
* @see com.digi.xbee.api.XBeeDevice
137131
* @see com.digi.xbee.api.models.OperatingMode
138132
*/
139-
public DataReader(IConnectionInterface connectionInterface, OperatingMode mode, XBeeDevice xbeeDevice) {
133+
public DataReader(IConnectionInterface connectionInterface, OperatingMode mode, AbstractXBeeDevice xbeeDevice) {
140134
if (connectionInterface == null)
141135
throw new NullPointerException("Connection interface cannot be null.");
142136
if (mode == null)
143137
throw new NullPointerException("Operating mode cannot be null.");
138+
if (xbeeDevice.isRemote())
139+
throw new IllegalArgumentException("The given local XBee device is remote.");
144140

145141
this.connectionInterface = connectionInterface;
146142
this.mode = mode;
@@ -1405,7 +1401,7 @@ private void notifyUserDataRelayReceived(UserDataRelayMessage relayMessage) {
14051401
* @since 1.3.0
14061402
*/
14071403
private void notifyUserDataRelayReceived(final UserDataRelayMessage relayMessage, final boolean notifyGeneric) {
1408-
ArrayList listenerList = new ArrayList<>();
1404+
ArrayList<?> listenerList = new ArrayList<>();
14091405

14101406
// Get the list of listeners that should be notified depending on the parameters.
14111407
if (notifyGeneric) {

library/src/main/java/com/digi/xbee/api/NodeDiscovery.java

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
/**
2-
* Copyright 2017, Digi International Inc.
1+
/*
2+
* Copyright 2017-2019, Digi International Inc.
33
*
44
* This Source Code Form is subject to the terms of the Mozilla Public
55
* License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -59,7 +59,7 @@ class NodeDiscovery {
5959
// Variables.
6060
private static int globalFrameID = 1;
6161

62-
private XBeeDevice xbeeDevice;
62+
private AbstractXBeeDevice xbeeDevice;
6363

6464
private List<RemoteXBeeDevice> deviceList;
6565

@@ -76,12 +76,15 @@ class NodeDiscovery {
7676
* @param xbeeDevice XBee Device to perform the discovery operation.
7777
*
7878
* @throws NullPointerException If {@code xbeeDevice == null}.
79+
* @throws IllegalArgumentException If {@code xbeeDevice.isRemote() == true}.
7980
*
8081
* @see XBeeDevice
8182
*/
82-
public NodeDiscovery(XBeeDevice xbeeDevice) {
83+
public NodeDiscovery(AbstractXBeeDevice xbeeDevice) {
8384
if (xbeeDevice == null)
8485
throw new NullPointerException("Local XBee device cannot be null.");
86+
if (xbeeDevice.isRemote())
87+
throw new IllegalArgumentException("The given local XBee device is remote.");
8588

8689
this.xbeeDevice = xbeeDevice;
8790

@@ -453,7 +456,7 @@ private byte[] getRemoteDeviceData(XBeeAPIPacket packet) {
453456
*
454457
* @return Discovered XBee device.
455458
*/
456-
private RemoteXBeeDevice parseDiscoveryAPIData(byte[] data, XBeeDevice localDevice) {
459+
private RemoteXBeeDevice parseDiscoveryAPIData(byte[] data, AbstractXBeeDevice localDevice) {
457460
if (data == null)
458461
return null;
459462

library/src/main/java/com/digi/xbee/api/RemoteDigiMeshDevice.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
/**
2-
* Copyright 2017, Digi International Inc.
1+
/*
2+
* Copyright 2017-2019, Digi International Inc.
33
*
44
* This Source Code Form is subject to the terms of the Mozilla Public
55
* License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -73,7 +73,7 @@ public RemoteDigiMeshDevice(DigiMeshDevice localXBeeDevice, XBee64BitAddress add
7373
*
7474
* @see com.digi.xbee.api.models.XBee64BitAddress
7575
*/
76-
public RemoteDigiMeshDevice(XBeeDevice localXBeeDevice, XBee64BitAddress addr64) {
76+
public RemoteDigiMeshDevice(AbstractXBeeDevice localXBeeDevice, XBee64BitAddress addr64) {
7777
super(localXBeeDevice, addr64);
7878

7979
// Verify the local device has DigiMesh protocol.
@@ -100,7 +100,7 @@ public RemoteDigiMeshDevice(XBeeDevice localXBeeDevice, XBee64BitAddress addr64)
100100
*
101101
* @see com.digi.xbee.api.models.XBee64BitAddress
102102
*/
103-
public RemoteDigiMeshDevice(XBeeDevice localXBeeDevice, XBee64BitAddress addr64, String id) {
103+
public RemoteDigiMeshDevice(AbstractXBeeDevice localXBeeDevice, XBee64BitAddress addr64, String id) {
104104
super(localXBeeDevice, addr64, null, id);
105105

106106
// Verify the local device has DigiMesh protocol.

library/src/main/java/com/digi/xbee/api/RemoteDigiPointDevice.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
/**
2-
* Copyright 2017, Digi International Inc.
1+
/*
2+
* Copyright 2017-2019, Digi International Inc.
33
*
44
* This Source Code Form is subject to the terms of the Mozilla Public
55
* License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -75,7 +75,7 @@ public RemoteDigiPointDevice(DigiPointDevice localXBeeDevice, XBee64BitAddress a
7575
*
7676
* @see com.digi.xbee.api.models.XBee64BitAddress
7777
*/
78-
public RemoteDigiPointDevice(XBeeDevice localXBeeDevice, XBee64BitAddress addr64) {
78+
public RemoteDigiPointDevice(AbstractXBeeDevice localXBeeDevice, XBee64BitAddress addr64) {
7979
super(localXBeeDevice, addr64);
8080

8181
// Verify the local device has point-to-multipoint protocol.
@@ -103,7 +103,7 @@ public RemoteDigiPointDevice(XBeeDevice localXBeeDevice, XBee64BitAddress addr64
103103
*
104104
* @see com.digi.xbee.api.models.XBee64BitAddress
105105
*/
106-
public RemoteDigiPointDevice(XBeeDevice localXBeeDevice, XBee64BitAddress addr64, String id) {
106+
public RemoteDigiPointDevice(AbstractXBeeDevice localXBeeDevice, XBee64BitAddress addr64, String id) {
107107
super(localXBeeDevice, addr64, null, id);
108108

109109
// Verify the local device has point-to-multipoint protocol.

library/src/main/java/com/digi/xbee/api/RemoteRaw802Device.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
/**
2-
* Copyright 2017, Digi International Inc.
1+
/*
2+
* Copyright 2017-2019, Digi International Inc.
33
*
44
* This Source Code Form is subject to the terms of the Mozilla Public
55
* License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -80,7 +80,7 @@ public RemoteRaw802Device(Raw802Device localXBeeDevice, XBee64BitAddress addr64)
8080
* @see com.digi.xbee.api.models.XBee16BitAddress
8181
* @see com.digi.xbee.api.models.XBee64BitAddress
8282
*/
83-
public RemoteRaw802Device(XBeeDevice localXBeeDevice, XBee64BitAddress addr64,
83+
public RemoteRaw802Device(AbstractXBeeDevice localXBeeDevice, XBee64BitAddress addr64,
8484
XBee16BitAddress addr16, String id) {
8585
super(localXBeeDevice, addr64, addr16, id);
8686

@@ -127,7 +127,7 @@ public RemoteRaw802Device(Raw802Device localXBeeDevice, XBee16BitAddress addr16)
127127
*
128128
* @see com.digi.xbee.api.models.XBee16BitAddress
129129
*/
130-
public RemoteRaw802Device(XBeeDevice localXBeeDevice, XBee16BitAddress addr16) {
130+
public RemoteRaw802Device(AbstractXBeeDevice localXBeeDevice, XBee16BitAddress addr16) {
131131
super(localXBeeDevice, XBee64BitAddress.UNKNOWN_ADDRESS);
132132

133133
// Verify the local device has 802.15.4 protocol.

library/src/main/java/com/digi/xbee/api/RemoteThreadDevice.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
/**
2-
* Copyright 2017, Digi International Inc.
1+
/*
2+
* Copyright 2017-2019, Digi International Inc.
33
*
44
* This Source Code Form is subject to the terms of the Mozilla Public
55
* License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -57,8 +57,8 @@ public class RemoteThreadDevice extends RemoteXBeeDevice {
5757
* @throws NullPointerException if {@code localXBeeDevice == null} or
5858
* if {@code ipv6addr == null}.
5959
*
60-
* @see #RemoteThreadDevice(XBeeDevice, Inet6Address)
61-
* @see #RemoteThreadDevice(XBeeDevice, Inet6Address, String)
60+
* @see #RemoteThreadDevice(AbstractXBeeDevice, Inet6Address)
61+
* @see #RemoteThreadDevice(AbstractXBeeDevice, Inet6Address, String)
6262
* @see com.digi.xbee.api.ThreadDevice
6363
* @see java.net.Inet6Address
6464
*/
@@ -82,11 +82,11 @@ public RemoteThreadDevice(ThreadDevice localXBeeDevice, Inet6Address ipv6Addr) {
8282
* if {@code ipv6addr == null}.
8383
*
8484
* @see #RemoteThreadDevice(ThreadDevice, Inet6Address)
85-
* @see #RemoteThreadDevice(XBeeDevice, Inet6Address, String)
85+
* @see #RemoteThreadDevice(AbstractXBeeDevice, Inet6Address, String)
8686
* @see com.digi.xbee.api.XBeeDevice
8787
* @see java.net.Inet6Address
8888
*/
89-
public RemoteThreadDevice(XBeeDevice localXBeeDevice, Inet6Address ipv6Addr) {
89+
public RemoteThreadDevice(AbstractXBeeDevice localXBeeDevice, Inet6Address ipv6Addr) {
9090
super(localXBeeDevice, ipv6Addr);
9191

9292
// Verify the local device has Thread protocol.
@@ -112,11 +112,11 @@ public RemoteThreadDevice(XBeeDevice localXBeeDevice, Inet6Address ipv6Addr) {
112112
* if {@code ipv6Address == null}.
113113
*
114114
* @see #RemoteThreadDevice(ThreadDevice, Inet6Address)
115-
* @see #RemoteThreadDevice(XBeeDevice, Inet6Address)
115+
* @see #RemoteThreadDevice(AbstractXBeeDevice, Inet6Address)
116116
* @see com.digi.xbee.api.XBeeDevice
117117
* @see java.net.Inet6Address
118118
*/
119-
public RemoteThreadDevice(XBeeDevice localXBeeDevice, Inet6Address ipv6Addr, String ni) {
119+
public RemoteThreadDevice(AbstractXBeeDevice localXBeeDevice, Inet6Address ipv6Addr, String ni) {
120120
super(localXBeeDevice, ipv6Addr, ni);
121121

122122
// Verify the local device has Thread protocol.

0 commit comments

Comments
 (0)