Skip to content

Instantly share code, notes, and snippets.

@ALRubinger
Last active August 29, 2015 14:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ALRubinger/1787151be3de7287850a to your computer and use it in GitHub Desktop.
Save ALRubinger/1787151be3de7287850a to your computer and use it in GitHub Desktop.
Calling:
FramedGraph:
public <F> F frame(final Vertex vertex, final Class<F> kind)
like:
final String framedObject = framedGraph.frame(vertex, String.class);
...yields:
error: incompatible types
final TYPE framedObject = framedGraph.frame(vertex, typeToCreate);
required: java.lang.String
found: Object
@ALRubinger
Copy link
Author

Solved: had a raw types warning above this line which IntelliJ hides and the JDK compiler doesn't spit out by default. Importing into Eclipse to have a look showed it right away. To enable the warning in IntelliJ: enable "Raw use of pamaterized class" inspection.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment