Skip to content

Commit

Permalink
remove unnecessary assign value
Browse files Browse the repository at this point in the history
  • Loading branch information
SmartDengg committed Jan 14, 2019
1 parent 3601ed5 commit 6cf5438
Showing 1 changed file with 5 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,13 @@ public void visit(int version, int access, String name, String signature, String
this.className = name;
}

@Override
public MethodVisitor visitMethod(int access, String name, String desc, String signature,
@Override public MethodVisitor visitMethod(int access, String name, String desc, String signature,
String[] exceptions) {

if (Utils.isViewOnclickMethod(access, name, desc) || Utils.isListViewOnItemOnclickMethod(access,
name, desc)) {
return new MethodNodeAdapter(api, access, name, desc, signature, exceptions,
className, unWeavedClassMap);
return new MethodNodeAdapter(api, access, name, desc, signature, exceptions, className,
unWeavedClassMap);
}

return super.visitMethod(access, name, desc, signature, exceptions);
Expand All @@ -54,23 +53,14 @@ static class MethodNodeAdapter extends MethodNode {
private String className;
private Map<String, List<MethodDelegate>> map;

private int access;
private String name;
private String desc;

MethodNodeAdapter(int api, int access, String name, String desc, String signature,
String[] exceptions, String className,
Map<String, List<MethodDelegate>> map) {
String[] exceptions, String className, Map<String, List<MethodDelegate>> map) {
super(api, access, name, desc, signature, exceptions);
this.className = className;
this.map = map;
this.access = access;
this.name = name;
this.desc = desc;
}

@Override
public void visitEnd() {
@Override public void visitEnd() {
if (hasInvokeOperation()) {
List<MethodDelegate> methodDelegates = map.get(className);
if (methodDelegates == null) methodDelegates = new ArrayList<>();
Expand Down

0 comments on commit 6cf5438

Please sign in to comment.