hasuniea 9 years ago
commit ca20492ddb

@ -121,7 +121,7 @@ public class AndroidDeviceManager implements DeviceManager {
new StringReader(new String((byte[]) resource.getContent(), Charset. new StringReader(new String((byte[]) resource.getContent(), Charset.
forName(MobilePluginConstants.CHARSET_UTF8)))); forName(MobilePluginConstants.CHARSET_UTF8))));
} }
return new TenantConfiguration(); return null;
} catch (MobileDeviceMgtPluginException e) { } catch (MobileDeviceMgtPluginException e) {
throw new DeviceManagementException( throw new DeviceManagementException(
"Error occurred while retrieving the Registry instance : " + e.getMessage(), e); "Error occurred while retrieving the Registry instance : " + e.getMessage(), e);

@ -113,11 +113,14 @@ public class WindowsDeviceManager implements DeviceManager {
MobileDeviceManagementUtil.getPlatformConfigPath(DeviceManagementConstants. MobileDeviceManagementUtil.getPlatformConfigPath(DeviceManagementConstants.
MobileDeviceTypes.MOBILE_DEVICE_TYPE_WINDOWS); MobileDeviceTypes.MOBILE_DEVICE_TYPE_WINDOWS);
resource = MobileDeviceManagementUtil.getRegistryResource(windowsTenantRegistryPath); resource = MobileDeviceManagementUtil.getRegistryResource(windowsTenantRegistryPath);
if(resource != null){
JAXBContext context = JAXBContext.newInstance(TenantConfiguration.class); JAXBContext context = JAXBContext.newInstance(TenantConfiguration.class);
Unmarshaller unmarshaller = context.createUnmarshaller(); Unmarshaller unmarshaller = context.createUnmarshaller();
return (TenantConfiguration) unmarshaller.unmarshal( return (TenantConfiguration) unmarshaller.unmarshal(
new StringReader(new String((byte[]) resource.getContent(), Charset new StringReader(new String((byte[]) resource.getContent(), Charset.
.forName(MobilePluginConstants.CHARSET_UTF8)))); forName(MobilePluginConstants.CHARSET_UTF8))));
}
return null;
} catch (MobileDeviceMgtPluginException e) { } catch (MobileDeviceMgtPluginException e) {
throw new DeviceManagementException( throw new DeviceManagementException(
"Error occurred while retrieving the Registry instance : " + e.getMessage(), e); "Error occurred while retrieving the Registry instance : " + e.getMessage(), e);

Loading…
Cancel
Save