[CID-992725] - Resource leak in ClientAuthenticationCache

Signed-off-by: Oleg Nenashev <o.v.nenashev@gmail.com>
This commit is contained in:
Oleg Nenashev committed 2014-11-04 15:53:55 +03:00
1 parent 9e72099115
commit 3a8b81a0fc
1 file changed
+7 -1
@@ -13,6 +13,7 @@ import org.springframework.dao.DataAccessException;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.Serializable;
import java.util.Properties;
@@ -50,7 +51,12 @@ public class ClientAuthenticationCache implements Serializable {
}
});
if (store.exists()) {
props.load(store.read());
InputStream istream = store.read();
try {
props.load(istream);
} finally {
istream.close();
}
}
}