commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ben Butler-Cole (JIRA)" <>
Subject [jira] [Created] (COMPRESS-365) Use java.nio.file.Path instead of
Date Tue, 23 Aug 2016 08:07:20 GMT
Ben Butler-Cole created COMPRESS-365:

             Summary: Use java.nio.file.Path instead of
                 Key: COMPRESS-365
             Project: Commons Compress
          Issue Type: Improvement
            Reporter: Ben Butler-Cole

When testing code that does file I/O it is faster and provides better isolation to use an
in-memory filesystem. The standard way of doing that is to use the java.nio.file package for
all file I/O and provide an in-memory implementation of java.nio.file.FileSystem (for example
Jimfs (

Unfortunately it's impossible to do this if code anywhere in the stack converts back to
So it's currently impossible to use Commons Compress with an in-memory filesystem. To enable
this there would need to be versions of all API methods that currently take objects and the implementation would need to be changed to use java.nio.file
classes throughout.

I can see that this is a fair bit of work (although when I've done similar conversions it's
been fairly easy to drive by leaning on the IDE and type system). But you would get big implementation
advantages from doing this because java.nio.file makes lots of things easy that are tedious
with and provides more safety around fallible operations. 

This message was sent by Atlassian JIRA

View raw message