Skip to content

Commit 9942860

Browse files
Bensikracbackportbot[bot]
authored andcommitted
fix: could cause infinte recursion, just null is enough
Signed-off-by: Benedek Major <benedek@major.onl>
1 parent d8bd2cf commit 9942860

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

app/src/test/java/com/owncloud/android/utils/FilesSyncHelperTest.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,7 @@ public void testWalkFileTreeNullHandling(){
4444
mockPath = mock(Path.class);
4545
Mockito.when(mockFile.isDirectory()).thenReturn(true);
4646
Mockito.when(mockPath.toFile()).thenReturn(mockFile);
47-
Mockito.when(mockFile.listFiles())
48-
.thenReturn(new File[]{mockFile, mockFile, mockFile})
49-
.thenReturn(new File[0])
50-
.thenReturn(null);
47+
Mockito.when(mockFile.listFiles()).thenReturn(null);
5148
Mockito.when(mockFile.canRead()).thenReturn(true);
5249

5350
SimpleFileVisitor<Path> visitor = new SimpleFileVisitor<Path>() {

0 commit comments

Comments
 (0)