File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
test/net/i2p/crypto/eddsa Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 22
33import java .io .BufferedReader ;
44import java .io .IOException ;
5+ import java .io .InputStream ;
56import java .io .InputStreamReader ;
67import java .util .ArrayList ;
78import java .util .Collection ;
@@ -32,8 +33,10 @@ public static Collection<TestTuple> getTestData(String fileName) {
3233 List <TestTuple > testCases = new ArrayList <TestTuple >();
3334 BufferedReader file = null ;
3435 try {
35- file = new BufferedReader (new InputStreamReader (
36- Ed25519TestVectors .class .getResourceAsStream (fileName )));
36+ InputStream is = Ed25519TestVectors .class .getResourceAsStream (fileName );
37+ if (is == null )
38+ throw new IOException ("Resource not found: " + fileName );
39+ file = new BufferedReader (new InputStreamReader (is ));
3740 String line ;
3841 while ((line = file .readLine ()) != null ) {
3942 testCases .add (new TestTuple (line ));
You can’t perform that action at this time.
0 commit comments