<div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Thanks for the reply ! Yes, "final int DEFAULT_TIMEOUT " works, but go back to my problem, is there any way to get the value without "final" 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"><<a href="mailto:tonywinslow1986@gmail.com" target="_blank">tonywinslow1986@gmail.com</a>></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 <<a href="mailto:xinxinjin89@gmail.com">xinxinjin89@gmail.com</a>> wrote:<br>
> Hello,<br>
><br>
> I have a question about how constants propagate from class fields to class<br>
> methods. I have a simple testing code:<br>
><br>
> public class MyActivity extends ActionBarActivity {<br>
> private int DEFAULT_TIMEOUT = 30000;<br>
><br>
> @Override<br>
> protected void onCreate(Bundle savedInstanceState) {<br>
> super.onCreate(savedInstanceState);<br>
> new FetchItemsTask().execute();<br>
> }<br>
> private class FetchItemsTask extends AsyncTask<Void,Void,String>{<br>
> @Override<br>
> protected String doInBackground(Void... arg0) {<br>
> int timeoutConnection = DEFAULT_TIMEOUT;<br>
> HttpParams httpParameters = new BasicHttpParams();<br>
> HttpConnectionParams.setConnectionTimeout(httpParameters,<br>
> timeoutConnection);<br>
> }<br>
> }<br>
><br>
> Basically I want to get the value of timeoutConnection called by<br>
> setConnectionTimeout. I used both ConstantPropagatorAndFolder() defined in<br>
> soot and InterproceduralConstantValuePropagator() defined in Soot-infoflow,<br>
> and expect DEFAULT_TIMEOUT should propagate to the parameter of<br>
> setConnnectionTimeout. However, I cannot get the integer constant from<br>
> setConnectionTimeout.<br>
><br>
> I guess if neither ConstantPropagatorAndFolder() nor<br>
> InterproceduralConstantValuePropagator() propagate the class fields to class<br>
> methods ? Then what is the correct way to do this ?<br>
> Please help me out !<br>
><br>
> Thank you for your help in advance !<br>
><br>
><br>
> --<br>
> Xinxin<br>
><br>
</div></div>> _______________________________________________<br>
> Soot-list mailing list<br>
> <a href="mailto:Soot-list@CS.McGill.CA">Soot-list@CS.McGill.CA</a><br>
> <a href="https://mailman.CS.McGill.CA/mailman/listinfo/soot-list" target="_blank">https://mailman.CS.McGill.CA/mailman/listinfo/soot-list</a><br>
><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>