title: AsyncTask returning null
body: <p>I'm using jsoup to parse a html code, I'm using obviously an AsyncTask but it's returning null (javanullpointerexception).</p>
  
  <pre><code>private class LoadDocument extends AsyncTask&lt;String, Void, Document&gt;
      {
  
          ProgressDialog mProgressDialog;
  
  
  
          @Override
          protected void onPreExecute() {
              mProgressDialog = ProgressDialog.show(Parser.this, "Loading...", "Recuperation donnees...");
          }
  
  
  
          @Override
          protected Document doInBackground(String... url) {
              url[0] = urll;
  
                  try {
                      document = Jsoup.connect(url[0])
                              .data("query", "Java")
                              .userAgent("Mozilla")
                              .cookie("auth", "token")
                              .timeout(10000)
                              .post();
                  } catch (IOException e) {
                      e.printStackTrace();
                  }
  
  
  
              return document;
          }
  
          @Override
          protected void onPostExecute(Document result) {
               document=result;
              mProgressDialog.dismiss();
  
          }
  
  
  }
  </code></pre>
  
  <p>And then to execute a task and return the document:</p>
  
  <pre><code>urll= //the website
  document=new LoadDocument().execute(urll).get();
  </code></pre>
  
  <p>I guess that document is always null. What's going wrong in my code?
  Thank you for helping.</p>