Update SimpleVersionControl.java
This commit is contained in:
parent
6b4bf338f2
commit
4149b5719e
@ -3,6 +3,7 @@ package io.izzel.taboolib.module.lite;
|
|||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
import io.izzel.taboolib.TabooLib;
|
import io.izzel.taboolib.TabooLib;
|
||||||
import io.izzel.taboolib.Version;
|
import io.izzel.taboolib.Version;
|
||||||
|
import io.izzel.taboolib.common.plugin.InternalPlugin;
|
||||||
import io.izzel.taboolib.common.plugin.bridge.BridgeLoader;
|
import io.izzel.taboolib.common.plugin.bridge.BridgeLoader;
|
||||||
import io.izzel.taboolib.util.Files;
|
import io.izzel.taboolib.util.Files;
|
||||||
import io.izzel.taboolib.util.Ref;
|
import io.izzel.taboolib.util.Ref;
|
||||||
@ -121,7 +122,7 @@ public class SimpleVersionControl {
|
|||||||
classReader.accept(classVisitor, ClassReader.EXPAND_FRAMES);
|
classReader.accept(classVisitor, ClassReader.EXPAND_FRAMES);
|
||||||
classWriter.visitEnd();
|
classWriter.visitEnd();
|
||||||
classVisitor.visitEnd();
|
classVisitor.visitEnd();
|
||||||
Class<?> newClass = AsmClassLoader.createNewClass(target, classWriter.toByteArray());
|
Class<?> newClass = plugin instanceof InternalPlugin ? AsmClassLoader.createNewClass(target, classWriter.toByteArray()) : BridgeLoader.createNewClass(target, classWriter.toByteArray());
|
||||||
if (useCache) {
|
if (useCache) {
|
||||||
cacheClasses.put(target, newClass);
|
cacheClasses.put(target, newClass);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user