提交 bce947f0 authored 作者: Evgenij Ryazanov's avatar Evgenij Ryazanov

Do not initialize StringUtils.softCache to a useless value

上级 685dd6b6
...@@ -22,8 +22,7 @@ import org.h2.message.DbException; ...@@ -22,8 +22,7 @@ import org.h2.message.DbException;
*/ */
public class StringUtils { public class StringUtils {
private static SoftReference<String[]> softCache = private static SoftReference<String[]> softCache;
new SoftReference<>(null);
private static long softCacheCreatedNs; private static long softCacheCreatedNs;
private static final char[] HEX = "0123456789abcdef".toCharArray(); private static final char[] HEX = "0123456789abcdef".toCharArray();
...@@ -902,7 +901,7 @@ public class StringUtils { ...@@ -902,7 +901,7 @@ public class StringUtils {
* Clear the cache. This method is used for testing. * Clear the cache. This method is used for testing.
*/ */
public static void clearCache() { public static void clearCache() {
softCache = new SoftReference<>(null); softCache = null;
} }
/** /**
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论