[Soot-list] Final locals used in anonymous/local classes

Keith Lea keith at cs.oswego.edu
Mon Jun 20 18:10:33 EDT 2005


Hi, I wonder, is there a way to get the Soot analyses (like null  
pointer coloring) to find properties of final local variables used in  
outer classes? For example:

class Test {
   void method() {
     final String s = System.getProperty("hi");
     if (s != null) {
       new Object() {
         void inner() {
           s.toString();
         }
     }
   }
}

Soot's null pointer checker marks the "s.toString()" call as  
requiring a null check when in fact it doesn't. Is there anything  
built into Soot to deal with this situation, or will I need to write  
my own?







More information about the Soot-list mailing list