This commit is contained in:
Redkale
2019-06-19 16:52:00 +08:00
parent 340a3a8fa3
commit 6927bfe8ac
2 changed files with 2 additions and 8 deletions

View File

@@ -462,12 +462,6 @@ public final class Rest {
av0.visitEnd();
fv.visitEnd();
}
{//_redkale_annotations
fv = cw2.visitField(ACC_PUBLIC + ACC_STATIC, "_redkale_annotations", "[Ljava/lang/annotation/Annotation;", null, null);
av0 = fv.visitAnnotation(convertDisabledDesc, true);
av0.visitEnd();
fv.visitEnd();
}
{ //空构造函数
mv = new MethodDebugVisitor(cw2.visitMethod(ACC_PUBLIC, "<init>", "()V", null, null));
mv.visitVarInsn(ALOAD, 0);
@@ -711,7 +705,7 @@ public final class Rest {
Class<?> newClazz = newLoader.loadClass(newDynName.replace('/', '.'), cw.toByteArray());
try {
T servlet = (T) newClazz.getDeclaredConstructor().newInstance();
((Map) newClazz.getField("_redkale_annotations").get(null)).putAll(msgclassToAnnotations);
newClazz.getField("_redkale_annotations").set(null, msgclassToAnnotations);
if (rws.cryptor() != Cryptor.class) {
Cryptor cryptor = rws.cryptor().getDeclaredConstructor().newInstance();
Field cryptorField = newClazz.getSuperclass().getDeclaredField("cryptor"); //WebSocketServlet

View File

@@ -27,7 +27,7 @@ public final class _DyncChatWebSocketServlet extends WebSocketServlet {
@Resource
private ChatService _redkale_resource_0;
public static Map<String, Annotation[]> _redkale_annotations = new java.util.HashMap();
public static Map<String, Annotation[]> _redkale_annotations;
public _DyncChatWebSocketServlet() {
super();