Skip to content

Commit

Permalink
ocsf schema read fix (#92)
Browse files Browse the repository at this point in the history
  • Loading branch information
stas-panasiuk authored Dec 31, 2024
1 parent b8be254 commit e1f289b
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,11 @@ private byte[] readLocalFilePath(String fileName) {
String[] parts = uri.toString().split("!");
URI jarUri = URI.create(parts[0]);
try (FileSystem fs = FileSystems.newFileSystem(jarUri, Collections.emptyMap())) {
return Files.readAllBytes(fs.getPath(parts[1]));
StringBuilder filePathInsideJarBuilder = new StringBuilder();
for (int i = 1; i < parts.length; i++) {
filePathInsideJarBuilder.append(parts[i]);
}
return Files.readAllBytes(fs.getPath(filePathInsideJarBuilder.toString()));
} catch (IOException e) {
throw new RuntimeException(e);
}
Expand Down

0 comments on commit e1f289b

Please sign in to comment.