title: unchecked or unsafe operations. Recompile with -xlint:unchecked for details
body: <p>I am aware that there is number of similar posts. The error, as i understand, means that i should be more specific with types. My code:</p>
  
  <pre><code>import java.util.*;
  public class Storefront {
      private  LinkedList&lt;Item&gt; catalog = new LinkedList&lt;Item&gt;();
  
      public void addItem(String id, String name, String price, String quant) {
           Item it = new Item(id, name, price, quant);
           catalog.add(it);
      }
  
      public Item getItem(int i) {
              return (Item)catalog.get(i);
      }
  
      public int getSize() {
           return catalog.size();
      }
  
      //@SuppressWarnings("unchecked")
      public void sort() {
          Collections.sort(catalog);
      }
  }
  </code></pre>
  
  <p>However, I do specify that <code>LinkedList</code> consists of objects of type <code>Item</code>. When i compile it with -xlint, i get </p>
  
  <hr>
  
  <pre><code>warning: unchecked method invocation: method sort in class
  Collections is applied to given types
  Collections.sort(catalog);
  
  required: List'&lt;'T'&gt;'
  
  found: LinkedList'&lt;'Item'&gt;'
  
  where T is a type-variable:
  T extends Comparable'&lt;'? super T'&gt;' declared in method 
  '&lt;'T'&gt;'sort'&lt;'List'&lt;'T'&gt;'&gt;
  </code></pre>
  
  <hr>
  
  <p>As i understand, <code>LinkedList</code> implements <code>List</code> and <code>Item</code> implements <code>Comparable</code>. So, aren't 'required' and 'found' same?</p>
  
  <p>Also I was checking if <code>catalog.get(i);</code> is actually an Item (as, some say it may have caused the problem), but it produced the same error.</p>