Petri Hintukainen pushed to branch master at VideoLAN / libbluray
Commits:
e106dd9c by Petri Hintukainen at 2026-01-19T22:55:55+02:00
BD-J: Fix filesystem hooking in Java 25
- - - - -
1 changed file:
- src/libbluray/bdj/java/java/io/BDFileSystem.java
Changes:
=====================================
src/libbluray/bdj/java/java/io/BDFileSystem.java
=====================================
@@ -114,10 +114,10 @@ public abstract class BDFileSystem extends FileSystem {
});
}
- private static void init0(Class c) {
- Field filesystem;
- try {
- filesystem = c.getDeclaredField("fs");
+ private static void init0(Class c, String field_name)
+ throws NoSuchFieldException, IllegalAccessException {
+
+ Field filesystem = c.getDeclaredField(field_name);
filesystem.setAccessible(true);
FileSystem fs = (FileSystem)filesystem.get(null);
@@ -131,8 +131,17 @@ public abstract class BDFileSystem extends FileSystem {
//modifiersField.setInt(filesystem, filesystem.getModifiers()
& ~Modifier.FINAL);
filesystem.set(null, new BDFileSystemImpl(fs));
}
- } catch (Exception t) {
- error("Hooking FileSystem class failed: " + t);
+ }
+
+ private static void init0(Class c) {
+ try {
+ init0(c, "FS");
+ } catch (Exception t0) {
+ try {
+ init0(c, "fs");
+ } catch (Exception t1) {
+ error("Hooking FileSystem class failed: " + t0 + ", " + t1);
+ }
}
}
View it on GitLab:
https://code.videolan.org/videolan/libbluray/-/commit/e106dd9c0b5a7cd3e02da13df6d71c2c3bb56b18
--
View it on GitLab:
https://code.videolan.org/videolan/libbluray/-/commit/e106dd9c0b5a7cd3e02da13df6d71c2c3bb56b18
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance_______________________________________________
libbluray-devel mailing list
[email protected]
https://mailman.videolan.org/listinfo/libbluray-devel