提交 3a8b81a0 编写于 作者: O Oleg Nenashev

[CID-992725] - Resource leak in ClientAuthenticationCache

Signed-off-by: NOleg Nenashev <o.v.nenashev@gmail.com>
上级 9e720991
......@@ -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();
}
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册