[Soot-list] JastAdd not recognizing @Override annotation

Divam Jain d2jain at uwaterloo.ca
Thu Jul 4 12:49:10 EDT 2013


Are you using source files as input? If so, try using the *.class files to
avoid this issue.


On Thu, Jul 4, 2013 at 8:10 AM, Guru Devanla <gdevan2 at uic.edu> wrote:

> Hello All,
>
> When I run soot to generate Jimple files for a simple class implementing
> an interface I see exception listed below. For some reason, JastAdd does
> not seem to like the "@Override" annotation over an interface method
> implementation. I remember there was some change to @Override behavior from
> 1.5 to 1.6.
>
> Any input would be of great help.
>
> Here is the sample:
>
> *public interface ParentInterface {*
> *    public void parentinterface_method();*
> *}*
> *
> *
> *public class ParentClass implements ParentInterface {*
> *    public void parentclass_method(){*
> *    }*
> *
> *
> *    @Override*
> *    public void parentinterface_method() {*
> *        //To change body of implemented methods use File | Settings |
> File Templates.*
> *    }*
> *}*
>
>
> Now, when I run soot to generate the Jimple files, I have this exception:
> [line 15 here, the "@Override" statement]
>
> *com/ser/statecarver/testartifacts/ParentClass.java:15:*
> *  Semantic Error: method does not override a method from its superclass*
> *ERROR soot.CompilationDeathException:*
> *there were errors during parsing and/or type checking (JastAdd frontend)*
> *        at soot.JastAddInitialResolver.formAst
> (JastAddInitialResolver.java:63)*
> *        at soot.JavaClassSource.resolve (JavaClassSource.java:54)*
> *        at soot.SootResolver.bringToHierarchy (SootResolver.java:215)*
> *        at soot.SootResolver.bringToSignatures (SootResolver.java:239)*
> *        at soot.SootResolver.processResolveWorklist
> (SootResolver.java:154)*
> *        at soot.SootResolver.resolveClass (SootResolver.java:124)*
> *        at soot.Scene.loadClass (Scene.java:448)*
> *        at soot.Scene.loadClassAndSupport (Scene.java:433)*
> *        at soot.Scene.loadNecessaryClass (Scene.java:1053)*
> *        at soot.Scene.loadNecessaryClasses (Scene.java:1067)*
> *        at soot.Main.run (Main.java:167)*
> *        at soot.Main.main (Main.java:141)*
>
>
>
>
>
>
> _______________________________________________
> Soot-list mailing list
> Soot-list at sable.mcgill.ca
> http://mailman.cs.mcgill.ca/mailman/listinfo/soot-list
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.cs.mcgill.ca/pipermail/soot-list/attachments/20130704/c8a7c00f/attachment.html 


More information about the Soot-list mailing list