Skip to content

Commit a4c9463

Browse files
committed
Unimportant warning about unclosed resource
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/io/trunk@1441286 13f79535-47bb-0310-9956-ffa450edef68
1 parent dccf0a3 commit a4c9463

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/main/java/org/apache/commons/io/output/ByteArrayOutputStream.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,8 @@ public synchronized void writeTo(final OutputStream out) throws IOException {
275275
*/
276276
public static InputStream toBufferedInputStream(final InputStream input)
277277
throws IOException {
278+
// It does not matter if a ByteArrayOutputStream is not closed as close() is a no-op
279+
@SuppressWarnings("resource")
278280
final ByteArrayOutputStream output = new ByteArrayOutputStream();
279281
output.write(input);
280282
return output.toBufferedInputStream();

0 commit comments

Comments
 (0)