Skip to content
This repository was archived by the owner on Feb 26, 2025. It is now read-only.

Commit a024ac7

Browse files
committed
Merge branch 'hotfix/2.2.1'
2 parents 1e79b15 + 8007989 commit a024ac7

File tree

4 files changed

+13
-2
lines changed

4 files changed

+13
-2
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ This project provides a first API implementation, little optimized, but "complet
1414
<dependency>
1515
<groupId>com.upplication</groupId>
1616
<artifactId>s3fs</artifactId>
17-
<version>2.2.0</version>
17+
<version>2.2.1</version>
1818
</dependency>
1919
```
2020

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<groupId>com.upplication</groupId>
55
<artifactId>s3fs</artifactId>
66
<packaging>jar</packaging>
7-
<version>2.2.0</version>
7+
<version>2.2.1</version>
88
<name>s3fs</name>
99
<description>S3 filesystem provider for Java 7</description>
1010
<url>https://github.com/Upplication/Amazon-S3-FileSystem-NIO2</url>

src/main/java/com/upplication/s3fs/S3Path.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -528,6 +528,10 @@ public Iterator<Path> iterator() {
528528
}
529529

530530
List<String> paths = uriToList();
531+
532+
if (uriToList().isEmpty())
533+
return builder.build().iterator();
534+
531535
String lastPath = paths.get(paths.size() - 1);
532536

533537
for (String path : uriToList()) {

src/test/java/com/upplication/s3fs/Path/ItearatorTest.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
import static com.upplication.s3fs.util.S3EndpointConstant.S3_GLOBAL_URI_TEST;
1616
import static org.junit.Assert.assertEquals;
17+
import static org.junit.Assert.assertFalse;
1718

1819
public class ItearatorTest extends S3UnitTestBase {
1920

@@ -39,5 +40,11 @@ public void iterator() {
3940
assertEquals(getPath("file"), iterator.next());
4041
}
4142

43+
@Test
44+
public void iteratorEmtpy() {
45+
Iterator<Path> iterator = getPath("").iterator();
46+
assertFalse(iterator.hasNext());
47+
}
48+
4249

4350
}

0 commit comments

Comments
 (0)