mirror of
https://github.com/spring-projects/spring-framework
synced 2026-06-08 17:33:33 +00:00
Support empty file names in UriUtils::extractFileExtension
Closes gh-27639
This commit is contained in:
@@ -407,7 +407,7 @@ public abstract class UriUtils {
|
||||
int paramIndex = path.indexOf(';', begin);
|
||||
end = (paramIndex != -1 && paramIndex < end ? paramIndex : end);
|
||||
int extIndex = path.lastIndexOf('.', end);
|
||||
if (extIndex != -1 && extIndex > begin) {
|
||||
if (extIndex != -1 && extIndex >= begin) {
|
||||
return path.substring(extIndex + 1, end);
|
||||
}
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user