title: Type safety: Unchecked cast from Object
body: <p>I try to cast an object to my Action class, but it results in a warning:</p>
  
  <pre><code>Type safety: Unchecked cast from Object to Action&lt;ClientInterface&gt;
  
  Action&lt;ClientInterface&gt; action = null;
  try {
   Object o = c.newInstance();
   if (o instanceof Action&lt;?&gt;) {
    action = (Action&lt;ClientInterface&gt;) o;
   } else {
    // TODO 2 Auto-generated catch block
    throw new InstantiationException();
   }
   [...]
  </code></pre>
  
  <p>Thank you for any help</p>