Skip to content

Commit

Permalink
Do not require specifying the default filesystem
Browse files Browse the repository at this point in the history
Fix: #21
  • Loading branch information
io7m committed May 1, 2021
1 parent 359f539 commit f1631d1
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 5 deletions.
9 changes: 7 additions & 2 deletions README-CHANGES.xml
Expand Up @@ -39,7 +39,7 @@
<c:change date="2020-04-10T00:00:00+00:00" summary="Enable CheckStyle to enforce code style"/>
</c:changes>
</c:release>
<c:release date="2021-05-01T14:58:42+00:00" is-open="true" ticket-system="com.github.io7m.jwheatsheaf" version="3.0.0">
<c:release date="2021-05-01T15:01:13+00:00" is-open="true" ticket-system="com.github.io7m.jwheatsheaf" version="3.0.0">
<c:changes>
<c:change date="2021-04-10T00:00:00+00:00" summary="Allow the escape key to close file choosers">
<c:tickets>
Expand Down Expand Up @@ -96,11 +96,16 @@
<c:ticket id="29"/>
</c:tickets>
</c:change>
<c:change date="2021-05-01T14:58:42+00:00" summary="Fix the size formatter">
<c:change date="2021-05-01T00:00:00+00:00" summary="Fix the size formatter">
<c:tickets>
<c:ticket id="30"/>
</c:tickets>
</c:change>
<c:change date="2021-05-01T15:01:13+00:00" summary="Use the default filesystem by default">
<c:tickets>
<c:ticket id="21"/>
</c:tickets>
</c:change>
</c:changes>
</c:release>
</c:releases>
Expand Down
1 change: 0 additions & 1 deletion README.in
Expand Up @@ -35,7 +35,6 @@ final Window mainWindow = ...;

final var configuration =
JWFileChooserConfiguration.builder()
.setFileSystem(FileSystems.getDefault())
.build();

final var choosers = JWFileChoosers.create();
Expand Down
1 change: 0 additions & 1 deletion README.md
Expand Up @@ -50,7 +50,6 @@ final Window mainWindow = ...;
final var configuration =
JWFileChooserConfiguration.builder()
.setFileSystem(FileSystems.getDefault())
.build();
final var choosers = JWFileChoosers.create();
Expand Down
Expand Up @@ -22,6 +22,7 @@

import java.net.URL;
import java.nio.file.FileSystem;
import java.nio.file.FileSystems;
import java.nio.file.Path;
import java.time.format.DateTimeFormatter;
import java.util.List;
Expand Down Expand Up @@ -50,7 +51,11 @@ public interface JWFileChooserConfigurationType
* @return The file system traversed by the file chooser
*/

FileSystem fileSystem();
@Value.Default
default FileSystem fileSystem()
{
return FileSystems.getDefault();
}

/**
* @return The starting directory
Expand Down

0 comments on commit f1631d1

Please sign in to comment.