title: Why doesn't ListView.setAdapter(null) throw a null pointer exception?
body: <p>By chance I stumbled on this unique find. My code broke because I was getting a <code>NullPointerException</code> on my Adapter after implementing a LoaderManager when I didn't have the exception previously.</p>
  
  <p>So, I took the debugger and stepped through my onCreate method:</p>
  
  <pre><code>@Override
  public View onCreateView(LayoutInflater inflater, ViewGroup container,
                           Bundle savedInstanceState) {
      mDrawerListView = (ListView) inflater.inflate(
              R.layout.fragment_navigation_drawer, container, false);
  
      // Irrelevant code removed
  
      mDrawerListView.setAdapter(mAccountAdapter);
      return mDrawerListView;
  }
  </code></pre>
  
  <p>The irrelevant code just include adding a footer view and setting onClickListeners but not once in this method (or any other) do I assign something to <code>mAccountAdapter</code>. I know I'm supposed to, and I am going to, but I made the mistake of forgetting to do so.</p>
  
  <p>When I use the debugger and set a breakpoint at the <code>setAdapter(mAccountAdapter)</code> line I can see that <code>mAccountAdapter</code> is null. However, I can step over it and move on without ever getting a null pointer exception. Why am I allowed to pass a null value into that function?</p>