title: Java generics warnings on java.util.Collections
body: <p>I have a method:</p>
  
  <pre><code>public List&lt;Stuff&gt; sortStuff(List&lt;Stuff&gt; toSort) {
      java.util.Collections.sort(toSort);
  
      return toSort;
  }
  </code></pre>
  
  <p>This produces a warning:</p>
  
  <pre><code>Type safety: Unchecked invocation sort(List&lt;Stuff&gt;) of the generic method sort(List&lt;T&gt;) of type Collections.
  </code></pre>
  
  <p>Eclipse says the only way to fix the warning is to add <code>@SuppressWarnings("unchecked")</code> to my <code>sortStuff</code> method. That seems like a crummy way to do with something that is built into Java itself.</p>
  
  <p>Is this really my only option here? Why or why not? Thanks in advance!</p>