Fixing checkstyle errors

This commit is contained in:
Ryan Baxter
2024-10-18 09:19:14 -04:00
parent 96ca9935d9
commit d5ca5b6e2f
2 changed files with 4 additions and 2 deletions

View File

@@ -22,6 +22,7 @@ import java.nio.file.Paths;
import java.util.Collection;
import java.util.HashMap;
import java.util.LinkedHashSet;
import java.util.Locale;
import java.util.Map;
import java.util.Set;
import java.util.function.Function;
@@ -120,7 +121,7 @@ public abstract class ConfigMapPropertySourceLocator implements PropertySourceLo
}).toList().forEach(p -> {
try {
String content = new String(Files.readAllBytes(p)).trim();
String filename = p.toAbsolutePath().toString().toLowerCase();
String filename = p.toAbsolutePath().toString().toLowerCase(Locale.ROOT);
if (filename.endsWith(".properties")) {
addPropertySourceIfNeeded(c -> PROPERTIES_TO_MAP.apply(KEY_VALUE_TO_PROPERTIES.apply(c)), content,
filename, composite);

View File

@@ -26,6 +26,7 @@ import java.util.Collections;
import java.util.EnumSet;
import java.util.HashSet;
import java.util.List;
import java.util.Locale;
import java.util.Objects;
import java.util.Set;
import java.util.function.BiConsumer;
@@ -177,7 +178,7 @@ public abstract class SecretsPropertySourceLocator implements PropertySourceLoca
try {
String content = new String(Files.readAllBytes(filePath)).trim();
String sourceName = fileName.toLowerCase();
String sourceName = fileName.toLowerCase(Locale.ROOT);
SourceData sourceData = new SourceData(sourceName, Collections.singletonMap(fileName, content));
return new SecretsPropertySource(sourceData);
}