Merge pull request #835 from geethkokila/master

Fixing the null pointer
revert-70aa11f8
Madhawa Perera 7 years ago committed by GitHub
commit 2bd79e2dc3

@ -36,7 +36,7 @@ import java.util.List;
* Implements CRUD for Devices. This holds the generic implementation. An instance of this will be created for * Implements CRUD for Devices. This holds the generic implementation. An instance of this will be created for
* each device type. * each device type.
*/ */
public class DeviceTypePluginDAOImpl implements PluginDAO{ public class DeviceTypePluginDAOImpl implements PluginDAO {
private static final Log log = LogFactory.getLog(DeviceTypePluginDAOImpl.class); private static final Log log = LogFactory.getLog(DeviceTypePluginDAOImpl.class);
private DeviceTypeDAOHandler deviceTypeDAOHandler; private DeviceTypeDAOHandler deviceTypeDAOHandler;
@ -241,11 +241,13 @@ public class DeviceTypePluginDAOImpl implements PluginDAO{
} }
private String getPropertString(List<Device.Property> properties, String propertyName) { private String getPropertString(List<Device.Property> properties, String propertyName) {
if (properties != null) {
for (Device.Property property : properties) { for (Device.Property property : properties) {
if (property.getName() != null && property.getName().equals(propertyName)) { if (property.getName() != null && property.getName().equals(propertyName)) {
return property.getValue(); return property.getValue();
} }
} }
}
return null; return null;
} }

Loading…
Cancel
Save