mirror of
https://github.com/bwssytems/ha-bridge.git
synced 2025-12-19 16:41:53 +00:00
Issue with not checking for null
This commit is contained in:
@@ -220,19 +220,22 @@ public class DeviceDescriptor{
|
|||||||
}
|
}
|
||||||
|
|
||||||
public boolean containsType(String aType) {
|
public boolean containsType(String aType) {
|
||||||
if(this.mapType.contains(aType))
|
if(aType == null)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
if(this.mapType != null && this.mapType.contains(aType))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
if(this.deviceType.contains(aType))
|
if(this.deviceType != null && this.deviceType.contains(aType))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
if(this.onUrl.contains(aType))
|
if(this.onUrl != null && this.onUrl.contains(aType))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
if(this.dimUrl.contains(aType))
|
if(this.dimUrl != null && this.dimUrl.contains(aType))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
if(this.offUrl.contains(aType))
|
if(this.offUrl != null && this.offUrl.contains(aType))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
Reference in New Issue
Block a user