Skip to content

Commit

Permalink
chore(S3FS): Extract supported file attribute views to static field
Browse files Browse the repository at this point in the history
  • Loading branch information
guicamest committed Oct 2, 2023
1 parent 088d444 commit d09f1b0
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions src/main/java/software/amazon/nio/spi/s3/S3FileSystem.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,7 @@
import java.nio.file.*;
import java.nio.file.attribute.UserPrincipalLookupService;
import java.nio.file.spi.FileSystemProvider;
import java.util.Collections;
import java.util.HashSet;
import java.util.Objects;
import java.util.Set;
import java.util.*;
import java.util.regex.Pattern;
import java.util.regex.PatternSyntaxException;
import software.amazon.awssdk.services.s3.S3AsyncClient;
Expand Down Expand Up @@ -316,6 +313,8 @@ public Iterable<FileStore> getFileStores() {
return Collections.EMPTY_SET;
}

private static final Set<String> supportedFileAttributeViews =
Collections.singleton(BASIC_FILE_ATTRIBUTE_VIEW);
/**
* Returns the set of the file attribute views supported by this {@code FileSystem}.
* <br>
Expand All @@ -326,9 +325,7 @@ public Iterable<FileStore> getFileStores() {
*/
@Override
public Set<String> supportedFileAttributeViews() {
HashSet<String> views = new HashSet<>(2);
views.add(BASIC_FILE_ATTRIBUTE_VIEW);
return Collections.unmodifiableSet(views);
return supportedFileAttributeViews;
}

/**
Expand Down

0 comments on commit d09f1b0

Please sign in to comment.