-
-
Notifications
You must be signed in to change notification settings - Fork 33
Open
Description
The File API is being used to load resource files, however this breaks when the code is compiled to (and run from) a .jar; getResourceAsStream() can be considered to be used instead.
Example:
coming/src/main/java/fr/inria/prophet4j/utility/Structure.java
Lines 298 to 307 in de22408
| public void load(String filePath) { | |
| try { | |
| File vectorFile = new File(filePath); | |
| String string = FileUtils.readFileToString(vectorFile, Charset.defaultCharset()); | |
| String[] substrings = string.split(" "); | |
| parameterArray = Arrays.stream(substrings).mapToDouble(Double::valueOf).toArray(); | |
| } catch (IOException e) { | |
| e.printStackTrace(); | |
| } | |
| } |
Here, if the filePath variable has a form similar to file:/coming.jar!/prophet4j/... the File API won't know what to do.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels