title: How can you initialize List with the items of another list?
body: <p>I want to do something like:</p>
  
  <pre><code> List queryTerms = null;
  
   if (tsym) {
       queryTerms = buildTreasuryQueryTerms(event, budgetLevel, null, null);
   }
  
   queryTerms.add(buildQueryTerms(event, session, budgetLevel));
  </code></pre>
  
  <p>This compiles, but throws a null pointer exception when I try to do <code>queryTerms.add()</code> when <code>tsym == null</code>. Can you not initialize a List with <code>.add()</code>?</p>
  
  <p><em>ninja edit</em>: <code>buildQueryTerms</code> returns a <code>protected List</code></p>