Skip to content

Commit

Permalink
Use toLowerCase(Locale.ROOT) to avoid lowercase capital I (apache#18)
Browse files Browse the repository at this point in the history
  • Loading branch information
RussellSpitzer authored Jul 31, 2024
1 parent 38dc293 commit 8290019
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
import io.polaris.core.storage.azure.AzureStorageConfigurationInfo;
import io.polaris.core.storage.gcp.GcpStorageConfigurationInfo;
import java.util.List;
import java.util.Locale;
import java.util.Optional;
import org.jetbrains.annotations.NotNull;
import org.slf4j.Logger;
Expand Down Expand Up @@ -187,7 +188,7 @@ public static Optional<PolarisStorageConfigurationInfo> forEntityPath(

/** Validate if the provided allowed locations are valid for the storage type */
protected void validatePrefixForStorageType(String loc) {
if (!loc.toLowerCase().startsWith(storageType.prefix)) {
if (!loc.toLowerCase(Locale.ROOT).startsWith(storageType.prefix)) {
throw new IllegalArgumentException(
String.format(
"Location prefix not allowed: '%s', expected prefix: '%s'", loc, storageType.prefix));
Expand Down

0 comments on commit 8290019

Please sign in to comment.