Skip to content

Commit

Permalink
checkstyle: Fix Utility classes with public or default constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
guicamest committed Nov 16, 2023
1 parent 16e16a9 commit 627ab57
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
5 changes: 4 additions & 1 deletion src/main/java/software/amazon/nio/spi/s3/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@

package software.amazon.nio.spi.s3;

public class Constants {
class Constants {
public static final String PATH_SEPARATOR = "/";

private Constants() {
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@

package software.amazon.nio.spi.s3.util;

import static software.amazon.nio.spi.s3.Constants.PATH_SEPARATOR;

import java.net.URI;
import software.amazon.awssdk.services.s3.internal.BucketUtils;

Expand All @@ -22,6 +20,8 @@
*/
public class S3XFileSystemInfo extends S3FileSystemInfo {

private static final String URI_PATH_SEPARATOR = "/";

/**
* Creates a new instance and populates it with the information extracted
* from {@code uri}. The provided uri is parsed accordingly to the following
Expand Down Expand Up @@ -61,7 +61,7 @@ public S3XFileSystemInfo(URI uri) throws IllegalArgumentException {
if (uri.getPort() > 0) {
endpoint += ":" + uri.getPort();
}
bucket = uri.getPath().split(PATH_SEPARATOR)[1];
bucket = uri.getPath().split(URI_PATH_SEPARATOR)[1];

BucketUtils.isValidDnsBucketName(bucket, true);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ public class TimeOutUtils {
public static long TIMEOUT_TIME_LENGTH_3 = 3L;
public static final long TIMEOUT_TIME_LENGTH_5 = 5L;

private TimeOutUtils() {

}

/**
* Generate a time-out message string.
*
Expand Down

0 comments on commit 627ab57

Please sign in to comment.