mirror of
https://github.com/oliverschmidt/contiki.git
synced 2024-08-30 19:29:45 +00:00
Fixed compiler unchecked warning
This commit is contained in:
parent
4861aadb94
commit
46d1367566
@ -105,8 +105,8 @@ public class MoteInterfaceHandler {
|
|||||||
*/
|
*/
|
||||||
public <N extends MoteInterface> N getInterfaceOfType(Class<N> interfaceType) {
|
public <N extends MoteInterface> N getInterfaceOfType(Class<N> interfaceType) {
|
||||||
for (MoteInterface intf : moteInterfaces) {
|
for (MoteInterface intf : moteInterfaces) {
|
||||||
if (interfaceType.isAssignableFrom(intf.getClass())) {
|
if (interfaceType.isInstance(intf)) {
|
||||||
return (N) intf;
|
return interfaceType.cast(intf);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user