title: bug inserting fifth item to hashmap in java
body: <p>i have a wired bug,</p>
  
  <pre><code>HashMap map =new HashMap&lt;String, String&gt; ()
  </code></pre>
  
  <p>i add items to map, (map start with size 2)</p>
  
  <pre><code>table   HashMap$HashMapEntry[2]  (id=830028484912)  
      [0] null    
      [1] null    
  </code></pre>
  
  <p>after adding 2 items map growth to 4 and looks like</p>
  
  <pre><code>table   HashMap$HashMapEntry[4]  (id=830055921064)  
      [0] HashMap$HashMapEntry  (id=830055921104) 
      [1] null    
      [2] HashMap$HashMapEntry  (id=830055922960) 
      [3] null    
  </code></pre>
  
  <p>after adding 2 more items (total 4) it look like</p>
  
  <pre><code>table   HashMap$HashMapEntry[4]  (id=830055921064)  
      [0] HashMap$HashMapEntry  (id=830055921104) 
      [1] HashMap$HashMapEntry  (id=830055930192) 
      [2] HashMap$HashMapEntry  (id=830055922960) 
      [3] HashMap$HashMapEntry  (id=830055933488) 
  </code></pre>
  
  <p>after adding the fifth item it should grow to 8 and contain 5 items, but it contain only 4</p>
  
  <pre><code>table   HashMap$HashMapEntry[8]  (id=830055946352)  
      [0] null    
      [1] HashMap$HashMapEntry  (id=830055930192) 
      [2] HashMap$HashMapEntry  (id=830055922960) 
      [3] HashMap$HashMapEntry  (id=830055946408) 
      [4] HashMap$HashMapEntry  (id=830055921104) 
      [5] null    
      [6] null    
      [7] null    
  </code></pre>
  
  <p>i insert items using put, when all keys and value are different,</p>
  
  <p>i found a solution but it a bad one, reconfigure the hash map to start with more items then i put, for example in this case any item over 5 will fit, however i make it s a part of an infrastructure and i don't want to limit it, i want it to grow when needed.</p>