Skip to content

Commit 105c3bb

Browse files
committed
small patch
1 parent 1b8458d commit 105c3bb

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/main/java/iotaFlashWrapper/IotaFlashBridge.java

+1-5
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99
import java.io.IOException;
1010
import java.net.URL;
1111
import java.nio.charset.Charset;
12-
import java.nio.file.Files;
13-
import java.nio.file.Paths;
1412
import java.util.ArrayList;
1513
import java.util.List;
1614
import java.util.Map;
@@ -27,7 +25,6 @@ public class IotaFlashBridge {
2725

2826
public static void boot() throws IOException {
2927
String file = readFile(iotaLibPath, Charset.defaultCharset());
30-
3128
engine = V8.createV8Runtime();
3229
// Eval lib into current v8 context.
3330
engine.executeVoidScript(file);
@@ -306,8 +303,7 @@ public static FlashObject applyTransfersToUser(UserObject user, ArrayList<Bundle
306303
static String readFile(String path, Charset encoding)
307304
throws IOException
308305
{
309-
URL url = IotaFlashBridge.class.getClassLoader().getResource(path);
310-
File file = new File(url.getPath());
306+
File file = new File(IotaFlashBridge.class.getClassLoader().getResource(path).getFile());
311307
FileInputStream fis = new FileInputStream(file);
312308
byte[] data = new byte[(int) file.length()];
313309
fis.read(data);

0 commit comments

Comments
 (0)