Unverified 提交 69bae116 authored 作者: Evgenij Ryazanov's avatar Evgenij Ryazanov 提交者: GitHub

Merge pull request #1599 from turbanoff/patch-1

cleanup StringUtils.cache
......@@ -941,15 +941,13 @@ public class StringUtils {
} else if (s.isEmpty()) {
return "";
}
int hash = s.hashCode();
String[] cache = getCache();
if (cache != null) {
int hash = s.hashCode();
int index = hash & (SysProperties.OBJECT_CACHE_SIZE - 1);
String cached = cache[index];
if (cached != null) {
if (s.equals(cached)) {
return cached;
}
if (s.equals(cached)) {
return cached;
}
cache[index] = s;
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论