.class reference doesn't handled properly.
for example,
--------------------------
package test;
public class Main {
public static void main(String[]args) {
new Test();
}
static class Test {
Test() {
System.out.println("" + Test.class);
}
}
}
---------------------------
Test class renamed to a, but Test.class reference
still remains "test.Main$Test". I think this is a
bug in
proguard.classfile.util.ClassFileReferenceInitializer.java.
In ClassFileReferenceInitializer$MyClassForNameFinder#
visitMethodrefCpInfo() method,
----------------------------
isDotClassInvocation =
className .equals(classFile.getName()) && // remove
this LINE
methodName.equals(ClassConstants.INTERNAL_METHOD_NAME_DOT_CLASS)&&
(methodType.equals(ClassConstants.INTERNAL_METHOD_TYPE_DOT_CLASS_JAVAC)||
methodType.equals(ClassConstants.INTERNAL_METHOD_TYPE_DOT_CLASS_JIKES));
-----------------------------
className represents outer class, but
classFile.getName() represents inner class.
So they don't match.
Logged In: YES
user_id=555208
You're right. This way of compiling .class in inner classes
seems to be a new feature of JDK 1.4. Your fix should work
fine indeed.
Since .class constructs can be compiled in any number of
ways by different compilers, I can only try to keep up with
the various signatures and then handle them properly.
Thanks for your help!
Eric.