Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
refactor: use toLowerCase instead of regionMatches in FileDataStoreFa…
…ctory
  • Loading branch information
diesieben07 committed Dec 29, 2019
commit 6bc4da2f09a0341e730663da84d1d6ebbffb8eec
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
import java.nio.file.attribute.PosixFilePermission;
import java.nio.file.attribute.UserPrincipal;
import java.util.HashSet;
import java.util.Locale;
import java.util.Set;
import java.util.logging.Logger;

Expand All @@ -54,7 +55,7 @@ public class FileDataStoreFactory extends AbstractDataStoreFactory {
private static final Logger LOGGER = Logger.getLogger(FileDataStoreFactory.class.getName());

private static final boolean IS_WINDOWS = StandardSystemProperty.OS_NAME.value()
.regionMatches(true, 0, "WINDOWS", 0, "WINDOWS".length());
.toLowerCase(Locale.ENGLISH).startsWith("windows");

/** Directory to store data. */
private final File dataDirectory;
Expand Down