Support empty file names in UriUtils::extractFileExtension

Closes gh-27639
This commit is contained in:
Arjen Poutsma
2021-11-19 12:37:00 +01:00
parent c37d6c30a0
commit 722ab25f27
2 changed files with 2 additions and 1 deletions

View File

@@ -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;