Skip to content
Snippets Groups Projects
Commit 74aee37f authored by paweldomas's avatar paweldomas
Browse files

Default properties on Android. Close stream.

Changes the method used to load default properties file on Android.
Closes the stream after loading.
parent fad4b65f
No related branches found
No related tags found
No related merge requests found
......@@ -1559,7 +1559,20 @@ private void loadDefaultProperties(String fileName)
{
Properties fileProps = new Properties();
fileProps.load(ClassLoader.getSystemResourceAsStream(fileName));
InputStream fileStream;
if(OSUtils.IS_ANDROID)
{
fileStream
= getClass().getClassLoader()
.getResourceAsStream(fileName);
}
else
{
fileStream = ClassLoader.getSystemResourceAsStream(fileName);
}
fileProps.load(fileStream);
fileStream.close();
// now get those properties and place them into the mutable and
// immutable properties maps.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment