Skip to content

Commit d019fb3

Browse files
committed
Merge branch 'master' into slf4j2
2 parents e7d09d0 + b33d74c commit d019fb3

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

biojava-core/src/test/java/org/biojava/nbio/core/sequence/io/FastaStreamerTest.java

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
import org.junit.Test;
66

77
import java.io.IOException;
8+
import java.net.URI;
9+
import java.net.URISyntaxException;
810
import java.nio.file.Path;
911
import java.nio.file.Paths;
1012
import java.util.List;
@@ -16,9 +18,9 @@
1618
public class FastaStreamerTest {
1719

1820
@Test
19-
public void stream() throws IOException {
20-
String file = this.getClass().getResource("PF00104_small.fasta.gz").getFile();
21-
Path path = Paths.get(file);
21+
public void stream() throws IOException, URISyntaxException {
22+
URI fileUri = this.getClass().getResource("PF00104_small.fasta.gz").toURI();
23+
Path path = Paths.get(fileUri);
2224
List<ProteinSequence> sequences;
2325

2426
sequences = FastaStreamer.from(path).stream().collect(Collectors.toList());
@@ -38,9 +40,9 @@ public void stream() throws IOException {
3840
}
3941

4042
@Test
41-
public void iterate() {
42-
String file = this.getClass().getResource("PF00104_small.fasta.gz").getFile();
43-
Path path = Paths.get(file);
43+
public void iterate() throws URISyntaxException {
44+
URI fileUri = this.getClass().getResource("PF00104_small.fasta.gz").toURI();
45+
Path path = Paths.get(fileUri);
4446
int count = 0;
4547
for (ProteinSequence sequence : FastaStreamer.from(path).each()) {
4648
count++;

0 commit comments

Comments
 (0)