Reduce chances of CME when iterating class info cache
This commit is contained in:
parent
ddffe93f1a
commit
226e4a373b
|
|
@ -70,7 +70,8 @@ public class ClassInfoManager {
|
||||||
MixinEnvironment.getDefaultEnvironment().audit();
|
MixinEnvironment.getDefaultEnvironment().audit();
|
||||||
try {
|
try {
|
||||||
ClassNode emptyNode = new ClassNode();
|
ClassNode emptyNode = new ClassNode();
|
||||||
classInfoCache.entrySet().removeIf(entry -> {
|
List<Map.Entry<String, ClassInfo>> entries = new ArrayList<>(classInfoCache.entrySet());
|
||||||
|
entries.stream().filter(entry -> {
|
||||||
if(entry.getKey().equals("java/lang/Object"))
|
if(entry.getKey().equals("java/lang/Object"))
|
||||||
return false;
|
return false;
|
||||||
ClassInfo mixinClz = entry.getValue();
|
ClassInfo mixinClz = entry.getValue();
|
||||||
|
|
@ -88,7 +89,7 @@ public class ClassInfoManager {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
});
|
}).forEach(entry -> classInfoCache.remove(entry.getKey()));
|
||||||
} catch (RuntimeException e) {
|
} catch (RuntimeException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user