Simplify String concatenation
Closes gh-23470
This commit is contained in:
committed by
Sam Brannen
parent
aef67ea6bd
commit
6ef75d76cd
@@ -127,15 +127,13 @@ public class CachingResourceResolver extends AbstractResourceResolver {
|
||||
}
|
||||
|
||||
protected String computeKey(@Nullable HttpServletRequest request, String requestPath) {
|
||||
StringBuilder key = new StringBuilder(RESOLVED_RESOURCE_CACHE_KEY_PREFIX);
|
||||
key.append(requestPath);
|
||||
if (request != null) {
|
||||
String codingKey = getContentCodingKey(request);
|
||||
if (StringUtils.hasText(codingKey)) {
|
||||
key.append("+encoding=").append(codingKey);
|
||||
return RESOLVED_RESOURCE_CACHE_KEY_PREFIX + requestPath + "+encoding=" + codingKey;
|
||||
}
|
||||
}
|
||||
return key.toString();
|
||||
return RESOLVED_RESOURCE_CACHE_KEY_PREFIX + requestPath;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
|
||||
Reference in New Issue
Block a user