[Soot-list] try catch in methods issue

dinesh chhatani dinustudy at gmail.com
Mon Mar 29 04:56:22 EDT 2010


thanks for answering Eric,

See this is the part of code,


SootClass sClass = Scene.*v*().loadClassAndSupport(args[0]);

sClass.setApplicationClass();

*Iterator* methodIt = sClass.getMethods().iterator();

*while* (methodIt.hasNext()) {

SootMethod m = (SootMethod)methodIt.next();

 Body b = m.retrieveActiveBody();............this line throws Null pointer
exception for the  method of given class in arg[] (if that contains
try/catch block)


On Mon, Mar 29, 2010 at 1:41 PM, Eric Bodden <
bodden at st.informatik.tu-darmstadt.de> wrote:

> Hi Dinesh.
>
> > I want to create UnitGraphs for all my methods in the class
> > Now if my method is having try/catch block then when the body of that
> method
> > is retrieved by m.retrieveactivebody at this point it throws null pointer
> > exception.
>
> Normally whether or not a method has a try-catch block should have no
> impact on whether you can retrieve a body or not. I suspect that you
> are using Soot incorrectly but that is hard to say without seeing your
> code.
>
> > also what are limitations of soot as far as version is control(Is it
> working
> > for all jdk's) and upcoming versions in future
>
> This really depends what you want to use Soot for. Most functionality
> should work fine with any JDK.
>
> Eric
>



-- 
Regards,
Dinesh Chhatani
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.cs.mcgill.ca/pipermail/soot-list/attachments/20100329/83c0d274/attachment.html 


More information about the Soot-list mailing list