title: Convert list to array. java.lang.ArrayStoreException
body: <p>There is a list:</p>
  
  <pre><code>List&lt;Integer[]&gt; myList = new ArrayList&lt;Integer[]&gt;();
  </code></pre>
  
  <p>It contains a sigle entry, but might contain multiple entries:</p>
  
  <pre><code>myList = [[2,null,1,null,null,3,6,1,1]]
  </code></pre>
  
  <p>I need to convert this list into the array <code>Integer[][]</code>, but the conversion fails due to nulls:</p>
  
  <pre><code>Integer[] myArr = myList.toArray(new Integer[myList.size()]);
  </code></pre>
  
  <p>How to solve this issue?</p>
  
  <p><strong>Edit#1</strong></p>
  
  <p>I need to get:</p>
  
  <pre><code>myArr = [2,null,1,null,null,3,6,1,1]
  </code></pre>