AsyncTask onPostExecute received wrong parameter
<p>I have a simple AsyncTask class on Android, and I noticed that I always get the positive result passed to onPostExecute method even though I know that doInBackground returns negative.</p>

<p>Please take a look at my code. I run this code on debug and I confirm that I land on the exception block and I return false. but it is not reflected on onPostExecute.</p>

<pre><code>public class AsyncSendOSCTask extends AsyncTask&lt;OSCMessage, Void, Boolean&gt; {

private OSCPortOut oscPortOut;
private Activity activity;

public AsyncSendOSCTask(Activity activity, OSCPortOut oscPortOut) {
    this.activity = activity;
    this.oscPortOut = oscPortOut;
}   

@Override
protected Boolean doInBackground(OSCMessage... message) {
    try {

        this.oscPortOut.send(message[0]);
        return Boolean.TRUE;
    }
    catch(Exception exp) {
        return Boolean.FALSE;
    }
}



@Override
protected void onPostExecute(final Boolean result) {
    if(!result.booleanValue()) { // this is always true!!!          
        Toast.makeText(this.activity, "Error Sending OSC", Toast.LENGTH_SHORT).show();
    }
}
</code></pre>

<p>}</p>

<p>What am I missing here? Thanks for your help...</p>
