Avoid leaking CountingOutputStream.
+ Affects org.apache.commons.io.output.CountingOutputStream.
This commit is contained in:
parent
c0c0e05a29
commit
2db95470db
1 changed files with 1 additions and 3 deletions
|
@ -21,10 +21,8 @@ class ProgressBodyFactory extends DefaultBodyFactory {
|
|||
|
||||
@Override
|
||||
protected void copyData(InputStream inputStream, OutputStream outputStream) throws IOException {
|
||||
final CountingOutputStream countingOutputStream = new CountingOutputStream(outputStream);
|
||||
|
||||
Timer timer = new Timer();
|
||||
try {
|
||||
try (CountingOutputStream countingOutputStream = new CountingOutputStream(outputStream)) {
|
||||
timer.scheduleAtFixedRate(new TimerTask() {
|
||||
@Override
|
||||
public void run() {
|
||||
|
|
Loading…
Reference in a new issue