diff options
Diffstat (limited to 'archiva-modules/archiva-base')
-rw-r--r-- | archiva-modules/archiva-base/archiva-storage-api/src/main/java/org/apache/archiva/repository/storage/util/StorageUtil.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/archiva-modules/archiva-base/archiva-storage-api/src/main/java/org/apache/archiva/repository/storage/util/StorageUtil.java b/archiva-modules/archiva-base/archiva-storage-api/src/main/java/org/apache/archiva/repository/storage/util/StorageUtil.java index fa637c669..bd52e4b6d 100644 --- a/archiva-modules/archiva-base/archiva-storage-api/src/main/java/org/apache/archiva/repository/storage/util/StorageUtil.java +++ b/archiva-modules/archiva-base/archiva-storage-api/src/main/java/org/apache/archiva/repository/storage/util/StorageUtil.java @@ -90,7 +90,8 @@ public class StorageUtil */ public static Stream<StorageAsset> newAssetStream( StorageAsset start, boolean parallel ) { - return StreamSupport.stream( new AssetSpliterator( start ), parallel ); + final AssetSpliterator spliterator = new AssetSpliterator( start ); + return StreamSupport.stream( spliterator, parallel ).onClose( ( ) -> spliterator.close( ) ); } |