google / jimfs

An in-memory file system for Java 7+
Apache License 2.0
2.44k stars 276 forks source link

Test jimfs in a JPMS world #97

Open cpovirk opened 5 years ago

cpovirk commented 5 years ago

I have fears that it might not work with modules on, since it uses ServiceLoader: http://openjdk.java.net/projects/jigsaw/spec/sotms/#services

I assume that our tests either don't use modules at all or uses them but with a backdoor to directly access the code under test. We would have to look into this more.

cpovirk commented 5 years ago

I have some other notes in internal bug 142067432.

ascopes commented 2 years ago

For what it is worth, I am using Jimfs via JPMS already in my project.

I have yet to have any issues with using it with modules. It appears that the module based service provider mechanisms are just an optional alternative to the service files used in Java 8 and older. They still work as expected under Java 19.