See the attached zip.
The original jar works; the processed jar throws:
Exception in thread "main" java.lang.VerifyError: (class: tst/a, method: <init> signature: (Ljava/lang/Class;)V) Incompatible object argument for function call
at tst.Tst.main(Unknown Source)
Logged In: YES
user_id=555208
Originator: NO
Thanks for the report. I can reproduce it, and I'll investigate further.
Logged In: YES
user_id=555208
Originator: NO
Did you compile the code with the Eclipse compiler? It contains some slightly dubious bytecode. Admittedly, the JVM accepts it and executes it correctly. When compiled with Sun's javac, the code looks better, and ProGuard can handle it fine.
Logged In: YES
user_id=682737
Originator: YES
Yes, it's compiled by Eclipse. Is it just dubious or really incorrect (but accepted by the lenient jvm)?
Either way, I hope proguard can handle it.
Logged In: YES
user_id=555208
Originator: NO
Which version of the Eclipse compiler did you use? The problem seems to have been solved in the most recent version. In that case, I won't try to work around it in ProGuard.
Logged In: YES
user_id=682737
Originator: YES
I was using eclipse 3.2.
I tried with 3.3 now, and I'm getting:
Exception in thread "main" java.lang.NullPointerException
at tst.a.<init>(Unknown Source)
at tst.Tst.main(Unknown Source)
Logged In: YES
user_id=555208
Originator: NO
You mustn't forget to keep the special Enumeration methods (cfr. ProGuard Manual -> Examples -> Processing enumeration classes):
-keepclassmembers class * extends java.lang.Enum {
public static **[] values();
public static ** valueOf(java.lang.String);
}
Logged In: YES
user_id=682737
Originator: YES
Oh, you're right, that got lost in the process of reducing to a minimal example.
It works now, thanks for the help.