【发布时间】:2021-05-13 11:06:05
【问题描述】:
try (java.io.ByteArrayOutputStream out = (java.io.ByteArrayOutputStream) this.httpConnect.getOutputStream();) {
fortify 给出的这一行 - 未发布的资源:流漏洞。任何原因?我们已经将它添加到 try with resorces 中。
是否需要使用旧模式 [try.catch/finally] 来关闭资源?
这里,this.httpConnect 是:HttpURLConnection httpConnect = null;
请在这里提供一些建议。
【问题讨论】:
标签: java fortify try-with-resources