mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Fixed file handle leak on version.properties
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@23193 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -19,6 +19,7 @@
|
||||
package org.alfresco.repo.descriptor;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.Properties;
|
||||
|
||||
import org.alfresco.repo.descriptor.DescriptorServiceImpl.BaseDescriptor;
|
||||
@@ -61,7 +62,15 @@ public class ServerDescriptorDAOImpl implements DescriptorDAO
|
||||
public void setResource(final Resource descriptorResource) throws IOException
|
||||
{
|
||||
this.serverProperties = new Properties();
|
||||
this.serverProperties.load(descriptorResource.getInputStream());
|
||||
InputStream is = descriptorResource.getInputStream();
|
||||
try
|
||||
{
|
||||
this.serverProperties.load(is);
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (is != null) try { is.close(); } catch (IOException e) {}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user