提交 53745257 编写于 作者: F fit2-zhao

fix(测试跟踪): 修改文件流关闭

上级 a13c3b2d
......@@ -331,9 +331,8 @@ public class TestCaseService {
public void download(HttpServletResponse res) throws IOException {
// 发送给客户端的数据
byte[] buff = new byte[1024];
InputStream is = TestCaseService.class.getResourceAsStream("/io/metersphere/xmind/template/testcase.xml");
try (OutputStream outputStream = res.getOutputStream();
BufferedInputStream bis = new BufferedInputStream(is);) {
BufferedInputStream bis = new BufferedInputStream(TestCaseService.class.getResourceAsStream("/io/metersphere/xmind/template/testcase.xml"));) {
int i = bis.read(buff);
while (i != -1) {
outputStream.write(buff, 0, buff.length);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册