refactored code issues

This commit is contained in:
hasuniea 2016-02-15 10:46:29 +05:30
parent 9c1b34b891
commit e8a47a5239

View File

@ -121,8 +121,8 @@ public class WindowsDeviceManager implements DeviceManager {
if (resource != null) { 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 StringReader(new String((byte[]) resource.getContent(), Charset. new String((byte[]) resource.getContent(), Charset.
forName(MobilePluginConstants.CHARSET_UTF8)))); forName(MobilePluginConstants.CHARSET_UTF8))));
} }
return null; return null;
@ -134,7 +134,8 @@ public class WindowsDeviceManager implements DeviceManager {
"Error occurred while parsing the Windows configuration : " + e.getMessage(), e); "Error occurred while parsing the Windows configuration : " + e.getMessage(), e);
} catch (RegistryException e) { } catch (RegistryException e) {
throw new DeviceManagementException( throw new DeviceManagementException(
"Error occurred while retrieving the Registry resource of Windows configuration : " + e.getMessage(), e); "Error occurred while retrieving the Registry resource of Windows configuration : " +
e.getMessage(), e);
} }
} }