In spring-data-gremlin/spring-data-gremlin-core/src/main/java/org/springframework/data/gremlin/repository/SimpleGremlinRepository.java::save(), there are duplicated 'if (schema.isVertexSchema())':
if (schema.isVertexSchema()) {
element = graph.getVertex(schema.decodeId(id));
} else if (schema.isVertexSchema()) {
@transactional(readOnly = false)
public T save(Graph graph, T object) {
String id = schema.getObjectId(object);
if (StringUtils.isEmpty(id)) {
create(graph, object);
} else {
Element element;
if (schema.isVertexSchema()) {
element = graph.getVertex(schema.decodeId(id));
} else if (schema.isVertexSchema()) {
element = graph.getEdge(schema.decodeId(id));
} else {
throw new IllegalStateException("Schema is neither EDGE nor VERTEX!");
}
if (element == null) {
throw new IllegalStateException(String.format("Could not save %s with id %s, as it does not exist.", object, id));
}
schema.copyToGraph(graphAdapter, element, object);
}
return object;
}
In spring-data-gremlin/spring-data-gremlin-core/src/main/java/org/springframework/data/gremlin/repository/SimpleGremlinRepository.java::save(), there are duplicated 'if (schema.isVertexSchema())':
if (schema.isVertexSchema()) {
element = graph.getVertex(schema.decodeId(id));
} else if (schema.isVertexSchema()) {
@transactional(readOnly = false)
public T save(Graph graph, T object) {