We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ReflectUtil.class
private static final Map<String, Class<?>> name2ClassCache = new HashMap<String, Class<?>>(); ... Class<?> clz = name2ClassCache.get(className); if (clz != null) { return clz; } clz = forNameWithoutCache(className); if (clz != null) { // 应该没有内存消耗过多的可能,除非有些代码很恶心,创建特别多的类 name2ClassCache.put(className, clz); }
hashmap在多线程并发put/get时应该有问题
The text was updated successfully, but these errors were encountered:
replace cache map with thread-safe implemention. Fixes weibocom#6
8a84f1e
这里确实有可能出现并发问题,在返回值类型较多时有可能出现cpu占用高的问题,下个版本会修复。
Sorry, something went wrong.
e494965
Merge pull request #7 from qdaxb/fix_concurrency_bug
3242ffc
replace cache map with thread-safe implemention. Fixes #6
No branches or pull requests
ReflectUtil.class
hashmap在多线程并发put/get时应该有问题
The text was updated successfully, but these errors were encountered: