SerCeMan / jnr-fuse

FUSE implementation in Java using Java Native Runtime (JNR)
MIT License
365 stars 87 forks source link

Compatibility with jnr-ffi 2.1.9 #72

Open apetersson opened 5 years ago

apetersson commented 5 years ago

apparently, there was a change inside NativeClosureManager (jnr-ffi) between version 2.1.9 and 2.1.7. by having web3j v 4.1.0 as a dependency, i accidentally bumped jnr-ffi to 2.1.9 which caused jnr-fuse to break (but only for readdir). Fixed this via a custom resolutionStrategy in my build.gradle. It would be nice to have compatibility with jnr-ffi 2.1.9

The cause is the call

        Field classLoaderField = NativeClosureManager.class.getDeclaredField("classLoader");

which happens in ClosureHelper, NativeClosureManager appears to have changed in its internal structure.

This is an issue because it is easy to accidentally bump jnr-ffi to 2.1.9 f.ex. when depending on other libs that declare it.

apetersson commented 5 years ago

strongly related to #59 - a simple version bump is not sufficient.

SerCeMan commented 5 years ago

Hey, @apetersson!

Thank you for the report, it should be fixed by https://github.com/SerCeMan/jnr-fuse/pull/61. The PR is currently blocked on https://github.com/jnr/jnr-ffi/pull/169.