From 7cf82438c57b6cdbdfa45b6d15ee04d11bdcbb7f Mon Sep 17 00:00:00 2001 From: Olga Maciaszek-Sharma Date: Thu, 17 Oct 2024 15:38:24 +0200 Subject: [PATCH 1/2] Adjust to blocking lower/uper-casing without locale. --- .../springframework/cloud/configuration/TlsProperties.java | 5 +++-- src/checkstyle/checkstyle-suppressions.xml | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/spring-cloud-commons/src/main/java/org/springframework/cloud/configuration/TlsProperties.java b/spring-cloud-commons/src/main/java/org/springframework/cloud/configuration/TlsProperties.java index 0eca22c4a..2dc3d3fcd 100644 --- a/spring-cloud-commons/src/main/java/org/springframework/cloud/configuration/TlsProperties.java +++ b/spring-cloud-commons/src/main/java/org/springframework/cloud/configuration/TlsProperties.java @@ -1,5 +1,5 @@ /* - * Copyright 2017-2020 the original author or authors. + * Copyright 2017-2024 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,6 +16,7 @@ package org.springframework.cloud.configuration; +import java.util.Locale; import java.util.Map; import org.springframework.core.io.Resource; @@ -143,7 +144,7 @@ private String fileExtensionOf(Resource resource) { String name = resource.getFilename(); int index = name.lastIndexOf('.'); - return index < 0 ? "" : name.substring(index + 1).toLowerCase(); + return index < 0 ? "" : name.substring(index + 1).toLowerCase(Locale.ROOT); } } diff --git a/src/checkstyle/checkstyle-suppressions.xml b/src/checkstyle/checkstyle-suppressions.xml index f275182c8..8ccbaf065 100644 --- a/src/checkstyle/checkstyle-suppressions.xml +++ b/src/checkstyle/checkstyle-suppressions.xml @@ -22,4 +22,6 @@ + + From ac91cf794886c877eb908b9cb28c99f82e3e918e Mon Sep 17 00:00:00 2001 From: Olga Maciaszek-Sharma Date: Thu, 17 Oct 2024 15:52:25 +0200 Subject: [PATCH 2/2] Ignore lower/upper-casing without locale in tests. --- src/checkstyle/checkstyle-suppressions.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/checkstyle/checkstyle-suppressions.xml b/src/checkstyle/checkstyle-suppressions.xml index f275182c8..8ccbaf065 100644 --- a/src/checkstyle/checkstyle-suppressions.xml +++ b/src/checkstyle/checkstyle-suppressions.xml @@ -22,4 +22,6 @@ + +