commit | 7cd5c8b97bee59b7084cd7ac282990fcd4b75661 | [log] [tgz] |
---|---|---|
author | Sebastian Bazley <sebb@apache.org> | Mon Feb 17 00:06:40 2014 +0000 |
committer | Sebastian Bazley <sebb@apache.org> | Mon Feb 17 00:06:40 2014 +0000 |
tree | f79ca5e208fe591f2ff8efa63516e9a222fde416 | |
parent | 5cbc20677cd75b7ba1dbf7fca5980ffafc8f27c9 [diff] |
Inline the variable and avoid potential resource leak warning git-svn-id: https://svn.apache.org/repos/asf/commons/proper/fileupload/trunk@1568863 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/src/main/java/org/apache/commons/fileupload/MultipartStream.java b/src/main/java/org/apache/commons/fileupload/MultipartStream.java index 3438342..bf460f4 100644 --- a/src/main/java/org/apache/commons/fileupload/MultipartStream.java +++ b/src/main/java/org/apache/commons/fileupload/MultipartStream.java
@@ -589,8 +589,7 @@ */ public int readBodyData(OutputStream output) throws MalformedStreamException, IOException { - final InputStream istream = newInputStream(); - return (int) Streams.copy(istream, output, false); // N.B. Streams.copy closes the input stream + return (int) Streams.copy(newInputStream(), output, false); // N.B. Streams.copy closes the input stream } /**