Fix for possible NPE that could happen due to null device or null property list.

revert-dabc3590
charitha 8 years ago
parent 0504f34e22
commit 76a442e864

@ -73,11 +73,13 @@ public class MobileDeviceManagementUtil {
} }
private static String getPropertyValue(Device device, String property) { private static String getPropertyValue(Device device, String property) {
for (Device.Property prop : device.getProperties()) { if (device != null && device.getProperties() != null) {
if (property.equals(prop.getName())) { for (Device.Property prop : device.getProperties()) {
return prop.getValue(); if (property.equals(prop.getName())) {
} return prop.getValue();
} }
}
}
return null; return null;
} }

Loading…
Cancel
Save