Hi,
When I optimize my code using proguard (3.6 or 3.7
beta2), I get the following exception:
OS: Windows XP
JDK: 1.5.0_8
Proguard: 3.6 or 3.7 beta2
Input configuration: see attached file
Stack trace:
java.lang.ClassCastException:
proguard.classfile.IntegerCpInfo
at
proguard.classfile.ProgramClassFile.getCpString
(ProgramClassFile.java:278)
at
proguard.classfile.ProgramMemberInfo.getName
(ProgramMemberInfo.java:159)
at
proguard.classfile.editor.MemberReferenceFixer.fixElem
entValue(MemberReferenceFixer.java:453)
at
proguard.classfile.editor.MemberReferenceFixer.visitCl
assElementValue(MemberReferenceFixer.java:416)
at
proguard.classfile.attribute.annotation.ClassElementVa
lue.accept(ClassElementValue.java:73)
at
proguard.classfile.attribute.annotation.Annotation.ele
mentValuesAccept(Annotation.java:118)
at
proguard.classfile.editor.MemberReferenceFixer.visitAn
notation(MemberReferenceFixer.java:396)
at
proguard.classfile.attribute.annotation.RuntimeAnnotat
ionsAttrInfo.annotationsAccept
(RuntimeAnnotationsAttrInfo.java:56)
at
proguard.classfile.editor.MemberReferenceFixer.visitRu
ntimeVisibleAnnotationAttrInfo
(MemberReferenceFixer.java:359)
at
proguard.classfile.attribute.annotation.RuntimeVisible
AnnotationsAttrInfo.accept
(RuntimeVisibleAnnotationsAttrInfo.java:42)
at
proguard.classfile.ProgramClassFile.attributesAccept
(ProgramClassFile.java:690)
at
proguard.classfile.editor.MemberReferenceFixer.visitPr
ogramClassFile(MemberReferenceFixer.java:92)
at proguard.classfile.ProgramClassFile.accept
(ProgramClassFile.java:400)
at
proguard.classfile.ClassPool.classFilesAccept
(ClassPool.java:126)
at proguard.optimize.Optimizer.execute
(Optimizer.java:225)
at proguard.ProGuard.optimize
(ProGuard.java:278)
at proguard.ProGuard.execute(ProGuard.java:99)
at proguard.ProGuard.main(ProGuard.java:398)
Thanks!
Peter
Input configuration
Logged In: YES
user_id=555208
Hi -- thanks for the report. It would be helpful if you
could mail me the original jar files, or sample code that
illustrates the problem, so I can reproduce the problem
precisely. All code will remain confidential. I'll see what
I can do otherwise, but it will probably take longer.
Logged In: YES
user_id=1613032
Hi,
I have send the original jar files to lafortune at
users.sourceforge.net.
Peter
Logged In: YES
user_id=1613032
Hi,
I cannot send the jar files via lafortune at
users.sourceforge.net, because the "message size exceeds
maximum permitted".
Could you give me your personal e-mail address?
Thanks!
Peter
Logged In: YES
user_id=555208
The bug is related to annotations that are defined but not
actually used. You can work around it by not keeping the
annotation attributes, or, the other way around, by keeping
all annotation classes and methods; something like:
-keep interface * extends java.lang.annotation.Annotation {
*;
}
I'll see if I can solve this for ProGuard 3.7.
Logged In: YES
user_id=555208
The bug has been fixed for the upcoming version 3.7beta3.
Logged In: YES
user_id=1613032
Ok, thanks!