Skip to content

Commit 47dc9db

Browse files
committed
Fix collections presize
Signed-off-by: Surinder Kumar <surinder.kumar@t-systems.com>
1 parent f99e79c commit 47dc9db

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

library/src/main/java/com/owncloud/android/lib/common/utils/WebDavFileUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,8 @@ public List<RemoteFile> readAlbumData(MultiStatus remoteData, OwnCloudClient cli
8181
return Collections.emptyList();
8282
}
8383

84-
List<RemoteFile> files = new ArrayList<>();
8584
final var responses = remoteData.getResponses();
85+
List<RemoteFile> files = new ArrayList<>(Math.max(0, responses.length - 1));
8686

8787
// reading from 1 as 0th item will be just the root album path
8888
for (int i = 1; i < responses.length; i++) {

0 commit comments

Comments
 (0)