Merge branch '4.1.x'
This commit is contained in:
@@ -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;
|
||||
@@ -93,12 +95,12 @@ public class ProxyHostProperties {
|
||||
|
||||
@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);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -22,6 +22,7 @@ import java.nio.charset.Charset;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.nio.charset.UnsupportedCharsetException;
|
||||
import java.util.HashMap;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
@@ -160,7 +161,7 @@ public class ResourceController {
|
||||
String text = StreamUtils.copyToString(is, charset);
|
||||
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) {
|
||||
|
||||
@@ -18,6 +18,7 @@ package org.springframework.cloud.config.server.support;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import org.eclipse.jgit.errors.UnsupportedCredentialItem;
|
||||
@@ -53,7 +54,7 @@ public class GitSkipSslValidationCredentialsProvider extends CredentialsProvider
|
||||
* @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) {
|
||||
|
||||
Reference in New Issue
Block a user