From dbec98ab908866fc2f69cc54ec3b0a732411d1c8 Mon Sep 17 00:00:00 2001 From: "zhangbaolong.001" Date: Thu, 17 Dec 2020 18:01:22 +0800 Subject: [PATCH] fix bug --- .../com/meituan/robust/autopatch/PatchesControlFactory.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/auto-patch-plugin/src/main/java/com/meituan/robust/autopatch/PatchesControlFactory.java b/auto-patch-plugin/src/main/java/com/meituan/robust/autopatch/PatchesControlFactory.java index 10f1e517..a70df012 100644 --- a/auto-patch-plugin/src/main/java/com/meituan/robust/autopatch/PatchesControlFactory.java +++ b/auto-patch-plugin/src/main/java/com/meituan/robust/autopatch/PatchesControlFactory.java @@ -59,7 +59,7 @@ static String getAccessDispatchMethodBody(CtClass patchClass, String modifiedCla accessDispatchMethodBody.append(" android.util.Log.d(\"robust\",\"keyToValueRelation not contain\" );"); } accessDispatchMethodBody.append("patch=new " + patchClass.getName() + "(paramArrayOfObject[paramArrayOfObject.length - 1]);\n"); - accessDispatchMethodBody.append(" keyToValueRelation.put(paramArrayOfObject[paramArrayOfObject.length - 1], null);\n"); + accessDispatchMethodBody.append(" keyToValueRelation.put(paramArrayOfObject[paramArrayOfObject.length - 1], patch);\n"); accessDispatchMethodBody.append("}else{"); accessDispatchMethodBody.append("patch=(" + patchClass.getName() + ") keyToValueRelation.get(paramArrayOfObject[paramArrayOfObject.length - 1]);\n"); accessDispatchMethodBody.append("}");