title: Eclipse IDE -- Type safety: unchecked invocation
body: <p>I don't understand why the Eclipse IDE is giving me a "Type safety: unchecked invocation" warning on this method.</p>
  
  <pre><code>    public static Object decode(String _json, Class _class) {
          Gson gson = new Gson();
          return gson.fromJson(_json, _class);
      }
  </code></pre>
  
  <p>I have heavily redacted the code to just illustrate the issue. The code works fine; its just Eclipse that is having a cow.  The "return" line is the one with the warning.</p>
  
  <p>As is, the method is just a wrapper for <a href="https://google-gson.googlecode.com/svn/trunk/gson/docs/javadocs/com/google/gson/Gson.html#fromJson(java.lang.String,%20java.lang.Class)" rel="nofollow">Gson's object instantiation method</a>.  <strong>Am I doing something wrong? Do I need to handle something differently?</strong></p>
  
  <p>Is it because the return is of Type Object?  It HAS to be generic like that to be able to return all types of classes, right?</p>