Skip to content

Commit 0e557c5

Browse files
committed
Use EXTENSION_SEPARATOR constant instead of hardcoded '.'
Replaced all instances of the hardcoded '.' character with the EXTENSION_SEPARATOR constant in the StringUtils class. This refactor improves the code's readability and maintainability by ensuring that separator characters are defined consistently through the use of constants. No functional changes have been made.
1 parent d65bdce commit 0e557c5

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

spring-core/src/main/java/org/springframework/util/StringUtils.java

+3-2
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@
6060
* @author Sam Brannen
6161
* @author Brian Clozel
6262
* @author Sebastien Deleuze
63+
* @author SungbinYang
6364
* @since 16 April 2001
6465
*/
6566
public abstract class StringUtils {
@@ -536,7 +537,7 @@ public static Object quoteIfString(@Nullable Object obj) {
536537
* @param qualifiedName the qualified name
537538
*/
538539
public static String unqualify(String qualifiedName) {
539-
return unqualify(qualifiedName, '.');
540+
return unqualify(qualifiedName, EXTENSION_SEPARATOR);
540541
}
541542

542543
/**
@@ -722,7 +723,7 @@ public static String cleanPath(String path) {
722723
String pathToUse = normalizedPath;
723724

724725
// Shortcut if there is no work to do
725-
if (pathToUse.indexOf('.') == -1) {
726+
if (pathToUse.indexOf(EXTENSION_SEPARATOR) == -1) {
726727
return pathToUse;
727728
}
728729

0 commit comments

Comments
 (0)