-
Bug
-
Resolution: Won't Do
-
Major
-
None
-
1.3.2.Final
-
None
Coverity static analysis found possible occurrence of resource leak.
When fos.getFD() will throw exception FileOutputStream fos won't be closed.
FileAuditEndpoint.java
void setFile(final File file) throws IOException { boolean ok = false; final FileOutputStream fos = new FileOutputStream(file, true); try { final OutputStream bos = new BufferedOutputStream(fos); try { this.fileDescriptor = fos.getFD(); this.outputStream = bos; this.file = file; ok = true; } finally { if (! ok) { safeClose(bos); } } } finally { if (! ok) { safeClose(fos); } } }