[Soot-list] JastAdd not recognizing @Override annotation

Marc-André Laverdière-Papineau marc-andre.laverdiere-papineau at polymtl.ca
Thu Jul 4 14:20:27 EDT 2013


Hello,

That is a good workaround. Please note that we have a Java 7 grammar in
the works. So if you must parse source code, you could give that a shot
and help Eric in the process :)

Marc-André Laverdière-Papineau
Doctorant - PhD Candidate

On 04/07/13 12:49 PM, Divam Jain wrote:
> 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
> <mailto: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 <mailto:Soot-list at sable.mcgill.ca>
>     http://mailman.cs.mcgill.ca/mailman/listinfo/soot-list
> 
> 
> 
> 
> _______________________________________________
> Soot-list mailing list
> Soot-list at sable.mcgill.ca
> http://mailman.cs.mcgill.ca/mailman/listinfo/soot-list
> 


More information about the Soot-list mailing list