Fixed compiler unchecked warning
This commit is contained in:
parent
4861aadb94
commit
46d1367566
1 changed files with 2 additions and 2 deletions
|
@ -105,8 +105,8 @@ public class MoteInterfaceHandler {
|
|||
*/
|
||||
public <N extends MoteInterface> N getInterfaceOfType(Class<N> interfaceType) {
|
||||
for (MoteInterface intf : moteInterfaces) {
|
||||
if (interfaceType.isAssignableFrom(intf.getClass())) {
|
||||
return (N) intf;
|
||||
if (interfaceType.isInstance(intf)) {
|
||||
return interfaceType.cast(intf);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue