<div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Thanks for the reply ! Yes, &quot;final int DEFAULT_TIMEOUT &quot; works, but go back to my problem, is there any way to get the value without &quot;final&quot; keyword ? Thank you !</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Feb 7, 2015 at 12:30 PM, Dacong Yan <span dir="ltr">&lt;<a href="mailto:tonywinslow1986@gmail.com" target="_blank">tonywinslow1986@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Although named in all capitals, DEFAULT_TIMEOUT is not a constant.<br>
Maybe you can change it to<br>
  private final int DEFAULT_TIMEOUT = 30000;<br>
and see what happens.<br>
<div><div class="h5"><br>
On Sat, Feb 7, 2015 at 10:49 AM, Xinxin Jin &lt;<a href="mailto:xinxinjin89@gmail.com">xinxinjin89@gmail.com</a>&gt; wrote:<br>
&gt; Hello,<br>
&gt;<br>
&gt; I have a question about how constants propagate from class fields to class<br>
&gt; methods. I have a simple testing code:<br>
&gt;<br>
&gt; public class MyActivity extends ActionBarActivity {<br>
&gt;     private int DEFAULT_TIMEOUT = 30000;<br>
&gt;<br>
&gt;     @Override<br>
&gt;   protected void onCreate(Bundle savedInstanceState) {<br>
&gt; super.onCreate(savedInstanceState);<br>
&gt; new FetchItemsTask().execute();<br>
&gt;   }<br>
&gt;   private class FetchItemsTask extends AsyncTask&lt;Void,Void,String&gt;{<br>
&gt; @Override<br>
&gt; protected String doInBackground(Void... arg0) {<br>
&gt;             int timeoutConnection = DEFAULT_TIMEOUT;<br>
&gt;   HttpParams httpParameters = new BasicHttpParams();<br>
&gt;   HttpConnectionParams.setConnectionTimeout(httpParameters,<br>
&gt; timeoutConnection);<br>
&gt;         }<br>
&gt; }<br>
&gt;<br>
&gt; Basically I want to get the value of timeoutConnection called by<br>
&gt; setConnectionTimeout. I used both ConstantPropagatorAndFolder() defined in<br>
&gt; soot and InterproceduralConstantValuePropagator() defined in Soot-infoflow,<br>
&gt; and expect DEFAULT_TIMEOUT should propagate to the parameter of<br>
&gt; setConnnectionTimeout. However, I cannot get the integer constant from<br>
&gt; setConnectionTimeout.<br>
&gt;<br>
&gt; I guess if neither  ConstantPropagatorAndFolder() nor<br>
&gt; InterproceduralConstantValuePropagator() propagate the class fields to class<br>
&gt; methods ?  Then what is the correct way to do this ?<br>
&gt; Please help me out !<br>
&gt;<br>
&gt; Thank you for your help in advance !<br>
&gt;<br>
&gt;<br>
&gt; --<br>
&gt; Xinxin<br>
&gt;<br>
</div></div>&gt; _______________________________________________<br>
&gt; Soot-list mailing list<br>
&gt; <a href="mailto:Soot-list@CS.McGill.CA">Soot-list@CS.McGill.CA</a><br>
&gt; <a href="https://mailman.CS.McGill.CA/mailman/listinfo/soot-list" target="_blank">https://mailman.CS.McGill.CA/mailman/listinfo/soot-list</a><br>
&gt;<br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><font face="arial, helvetica, sans-serif">Xinxin</font></div>
</div>