title: Why is varargs (Class<? extends Throwable>... t) "unchecked or unsafe" operation?
body: <p>Ok so I'm calling a method with a signature <code>(Class&lt;? extends Throwable&gt;... exceptions)</code> and I get a "File.java uses unchecked or unsafe operations" warning here in the main method:</p>
  
  <pre><code>public class VarargsFun {
      public void onException(Class&lt;? extends Throwable&gt;... exceptions) { }
  
      public static void main(String[] args) {
          new VarargsFun().onException(IllegalArgumentException.class);
      }
  }
  </code></pre>
  
  <p>Shouldn't the compiler be able to see that <code>IllegalArgumentException</code> does indeed extend <code>RuntimeException</code>, <code>Exception</code> and <code>Throwable</code>?</p>
  
  <p>How should I properly amend my code to get rid of this warning?</p>
  
  <p>I don't really feel like instantiating my exceptions... it seems nicer to use the <code>.class</code></p>
  
  <p>(dont want to use <code>@SuppressWarnings</code> either!)</p>
  
  <p>Am using java 7. Thanks for any tips.</p>