diff options
author | Maria Odea B. Ching <oching@apache.org> | 2011-02-16 04:51:03 +0000 |
---|---|---|
committer | Maria Odea B. Ching <oching@apache.org> | 2011-02-16 04:51:03 +0000 |
commit | 1460694de398573063026e8a633dc93b2fbcba53 (patch) | |
tree | ad612fa6da4ffdc12e812a5f229582eea8c4dc1f /archiva-modules | |
parent | cb61344408064966c86d2c4269feae6a56f59d20 (diff) | |
download | archiva-1460694de398573063026e8a633dc93b2fbcba53.tar.gz archiva-1460694de398573063026e8a633dc93b2fbcba53.zip |
close streams from previous commit
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1071145 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-modules')
-rw-r--r-- | archiva-modules/plugins/stage-repository-merge/src/main/java/org/apache/archiva/stagerepository/merge/Maven2RepositoryMerger.java | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/archiva-modules/plugins/stage-repository-merge/src/main/java/org/apache/archiva/stagerepository/merge/Maven2RepositoryMerger.java b/archiva-modules/plugins/stage-repository-merge/src/main/java/org/apache/archiva/stagerepository/merge/Maven2RepositoryMerger.java index 735e35e26..7d3a6ff9b 100644 --- a/archiva-modules/plugins/stage-repository-merge/src/main/java/org/apache/archiva/stagerepository/merge/Maven2RepositoryMerger.java +++ b/archiva-modules/plugins/stage-repository-merge/src/main/java/org/apache/archiva/stagerepository/merge/Maven2RepositoryMerger.java @@ -228,8 +228,16 @@ public class Maven2RepositoryMerger FileOutputStream out = new FileOutputStream( targetFile ); FileInputStream input = new FileInputStream( sourceFile ); - // IOUtils internally buffers the streams - IOUtils.copy( input, out ); + // IOUtils internally buffers the streams + try + { + IOUtils.copy( input, out ); + } + finally + { + out.close(); + input.close(); + } } private void updateProjectMetadata( File projectMetaDataFileIntargetRepo, ArtifactMetadata artifactMetadata, |