commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gary Gregory (JIRA)" <>
Subject [jira] [Commented] (COMPRESS-365) Use java.nio.file.Path instead of
Date Tue, 23 Aug 2016 15:00:24 GMT


Gary Gregory commented on COMPRESS-365:

Instead of a big-bang patch for the whole component, I would suggest to create a subtask for
each file type and see if this can be done is smaller chunks. 

> Use java.nio.file.Path instead of
> ----------------------------------------------
>                 Key: COMPRESS-365
>                 URL:
>             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