[Soot-list] Relaxing Semantic rules for Java?

Marc-Andre Laverdiere-Papineau marc-andre.laverdiere-papineau at polymtl.ca
Thu Jul 12 07:02:37 EDT 2012


This is very interesting. I wasn't aware of that difference.

I am compiling from source code. I am doing that because I want to do 
analyses and be able to tell the user "problem in file xyz at line 12".

If working from .class files compiled with debug options, can soot get 
this information as well?

Otherwise, is there an option to choose the compliance level / Java 
version in soot?

On 07/12/2012 01:06 AM, Bernhard Berger wrote:
> Hello Marc-Andre,
>
> I've had similar problems with other source code. The cause for the
> error message is that the method does not override a method (since there
> is no implementation present in the interface). The behavior should be
> the same if you compile the code with JDK 5. They changed the behavior
> in JDK 6 where this annotation is valid in such situations. See [1] for
> more information. I do not use the source-code-based front end, but if
> it is configured to compile source code according to Java 1.6 it is a
> bug in the front end. With Java 1.5 it is the desired behavior.
>
> Regards,
>
> Bernhard
>
>
>
> [1]
> http://stackoverflow.com/questions/212614/should-a-method-that-implements-an-interface-method-be-annotated-with-override
>
> On Mi, 2012-07-11 at 21:21 -0400, Marc-Andre Laverdiere-Papineau wrote:
>> Hello,
>>
>> I am parsing a big code base, Alfresco, and I am getting some parsing
>> errors because of @Override annotations.
>>
>> Here are a few, but they're all on the same pattern
>> org/alfresco/wcm/client/impl/ResourceBaseImpl.java:110:
>>     Semantic Error: method does not override a method from its superclass
>> org/alfresco/wcm/client/impl/ResourceBaseImpl.java:119:
>>     Semantic Error: method does not override a method from its superclass
>> org/alfresco/wcm/client/impl/ResourceBaseImpl.java:129:
>>     Semantic Error: method does not override a method from its superclass
>> org/alfresco/wcm/client/impl/ResourceBaseImpl.java:138:
>>     Semantic Error: method does not override a method from its superclass
>>
>> I'm attaching the superclass and the extending class.
>>
>> I had this on a previous file, and I 'solved' the problem by deleting
>> the annotations, but I don't feel like doing it for the whole program. ;)
>>
>> At a quick glance, I don't see what would be wrong.
>> P.S. Note that the original file didn't have the methods public. I added
>> that, but it didn't solve anything
>>
>> First: is that a bug in the Java front-end?
>> Second: if not, is there an option to relax the semantic rules to get a
>> warning instead?
>
> _______________________________________________
> Soot-list mailing list
> Soot-list at sable.mcgill.ca
> http://mailman.cs.mcgill.ca/mailman/listinfo/soot-list
>


-- 
Marc-André Laverdière-Papineau
Étudiant au doctorat - PhD Student




More information about the Soot-list mailing list