title: Eclipse warning "Replace the type specification in this constructor call with the diamond operator ('<>')" in a Java project
body: <p>What does Eclipse mean when it asks to <code>Replace the type specification in this constructor call with the diamond operator ('&lt;&gt;')</code>, since the said operator is already there? </p>
  
  <p>Then I put the cursor on what is underlined in blue, and press <kbd>F2</kbd> to learn more, and I get this message (<code>Replace the type specification in this constructor call with the diamond operator ('&lt;&gt;')</code>):</p>
  
  <p><a href="https://i.stack.imgur.com/5Py9G.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/5Py9G.png" alt="An Eclipse warning saying &quot;Replace the type specification in this constructor call with the diamond operator (&#39;&lt;&gt;&#39;)&quot;"></a></p>
  
  <p>And if I delete <code>Object</code> from within <code>&lt;&gt;</code>, Eclipse still is not happy:</p>
  
  <p><a href="https://i.stack.imgur.com/tq6TV.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/tq6TV.png" alt="An Eclipse warning saying &quot;Replace the type specification in this constructor call with the diamond operator (&#39;&lt;&gt;&#39;)&quot;"></a></p>
  
  <h3>EDIT</h3>
  
  <p>We made sure that</p>
  
  <ul>
  <li><code>java.util.List</code> was imported </li>
  <li>changes were saved</li>
  <li><code>Project -&gt; Clean...</code> command was applied</li>
  </ul>
  
  <p>The blue warning still won't go away.</p>