My pom.xml file:
My one and only source file:
import com.thinkaurelius.titan.core.TitanFactory;
import com.thinkaurelius.titan.core.TitanGraph;
import com.thinkaurelius.titan.core.TitanVertex;
import org.apache.commons.configuration.BaseConfiguration;
public class Main
{
public static void main(String[] args)
{
final BaseConfiguration config = new BaseConfiguration();
config.setProperty("schema.default", "none");
config.setProperty("storage.backend","inmemory");
config.setProperty("cache.db-cache", Boolean.TRUE);
final TitanGraph graph = TitanFactory.open(config);
Iterable<TitanVertex> vertices = graph.query().has("name", "tim").vertices();
}
}
My IDE (IntelliJ v15) tells me:
Unchecked assignment: 'java.lang.Iterable' to 'java.lang.Iterable'. Reason: 'graph.query().has("name", "tim")' has raw type, so result of vertices is erased
on this line:
Iterable<TitanVertex> vertices = graph.query().has("name", "tim").vertices();
The recommended fix is to replace Iterable<TitanVertex> with Iterable but I don't want to use raw types if I don't have to.
Any ideas on how I can avoid raw types and eliminate (without ignoring) this warning?
Thanks!
Tim