Skip to content

Commit

Permalink
Fixes checkstyle issues
Browse files Browse the repository at this point in the history
Signed-off-by: kvmw <[email protected]>
  • Loading branch information
kvmw committed Oct 18, 2024
1 parent f08449c commit 37db7c4
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

package org.springframework.cloud.config.server.proxy;

import java.util.Locale;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonValue;
Expand Down Expand Up @@ -93,12 +95,12 @@ public enum ProxyForScheme {

@JsonCreator
public static ProxyForScheme forLowerCaseName(String lowerCaseName) {
return ProxyForScheme.valueOf(lowerCaseName.toUpperCase());
return ProxyForScheme.valueOf(lowerCaseName.toUpperCase(Locale.ROOT));
}

@JsonValue
public String lowercaseName() {
return this.name().toLowerCase();
return this.name().toLowerCase(Locale.ROOT);
}

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import java.io.InputStream;
import java.nio.charset.Charset;
import java.util.HashMap;
import java.util.Locale;
import java.util.Map;

import org.apache.commons.logging.Log;
Expand Down Expand Up @@ -143,7 +144,7 @@ synchronized String retrieve(ServletWebRequest request, String name, String prof
String text = StreamUtils.copyToString(is, Charset.forName("UTF-8"));
String ext = StringUtils.getFilenameExtension(resource.getFilename());
if (ext != null) {
ext = ext.toLowerCase();
ext = ext.toLowerCase(Locale.ROOT);
}
Environment environment = this.environmentRepository.findOne(name, profile, label, false);
if (resolvePlaceholders) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

import java.util.ArrayList;
import java.util.List;
import java.util.Locale;
import java.util.regex.Pattern;

import org.eclipse.jgit.errors.UnsupportedCredentialItem;
Expand Down Expand Up @@ -53,7 +54,7 @@ public GitSkipSslValidationCredentialsProvider(CredentialsProvider delegate) {
* @return {@code true} if it can be handled
*/
public static boolean canHandle(String uri) {
return uri != null && uri.toLowerCase().startsWith("https://");
return uri != null && uri.toLowerCase(Locale.ROOT).startsWith("https://");
}

private static String stripFormattingPlaceholders(String string) {
Expand Down

0 comments on commit 37db7c4

Please sign in to comment.