summaryrefslogtreecommitdiffstats
path: root/src/proguard/optimize/DuplicateInitializerInvocationFixer.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/proguard/optimize/DuplicateInitializerInvocationFixer.java')
-rw-r--r--src/proguard/optimize/DuplicateInitializerInvocationFixer.java12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/proguard/optimize/DuplicateInitializerInvocationFixer.java b/src/proguard/optimize/DuplicateInitializerInvocationFixer.java
index 5edaba0..22bfc52 100644
--- a/src/proguard/optimize/DuplicateInitializerInvocationFixer.java
+++ b/src/proguard/optimize/DuplicateInitializerInvocationFixer.java
@@ -2,7 +2,7 @@
* ProGuard -- shrinking, optimization, obfuscation, and preverification
* of Java bytecode.
*
- * Copyright (c) 2002-2013 Eric Lafortune (eric@graphics.cornell.edu)
+ * Copyright (c) 2002-2014 Eric Lafortune (eric@graphics.cornell.edu)
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
@@ -131,11 +131,15 @@ implements AttributeVisitor,
// Implementations for ConstantVisitor.
- public void visitMethodrefConstant(Clazz clazz, MethodrefConstant methodrefConstant)
+ public void visitAnyMethodrefConstant(Clazz clazz, RefConstant refConstant)
{
// Check the referenced constructor descriptor.
- descriptor = methodrefConstant.getType(clazz);
- methodrefConstant.referencedMemberAccept(this);
+ if (refConstant.getName(clazz).equals(ClassConstants.METHOD_NAME_INIT))
+ {
+ descriptor = refConstant.getType(clazz);
+
+ refConstant.referencedMemberAccept(this);
+ }
}