从受管 Bean 发布时警告“[参数] 参数:忽略无效块”
我正在从托管 Bean 内部打开一个以发布到外部服务。当我拨打电话时,我收到以下警告:HttpURLConnection
HttpUrlConnection.getInputStream()
警告 [参数] 参数:忽略无效块
一切都很好,但我想从我们的日志中保留一堆警告。是什么导致了此警告,我该如何阻止它发生?
以下是相关代码:
@ManagedBean
@SessionScoped
public class MyController {
private void doStuff() {
...
URL url = new URL(externalServiceUrl);
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
conn.setDoOutput(true);
conn.setDoInput(true);
wr = new OutputStreamWriter(conn.getOutputStream());
wr.write(postData);
wr.flush();
InputStream is = conn.getInputStream(); // Warning logged after this line
...
}
}