package com.gentics.mesh.graphdb;

import com.gentics.mesh.graphdb.spi.Database;
import com.syncleus.ferma.DelegatingFramedGraph;
import com.syncleus.ferma.FramedGraph;
import com.tinkerpop.blueprints.impls.orient.OrientGraphFactory;

import io.vertx.core.logging.Logger;
import io.vertx.core.logging.LoggerFactory;

public class OrientDBNoTrx extends AbstractNoTrx implements AutoCloseable {

	private static final Logger log = LoggerFactory.getLogger(OrientDBNoTrx.class);

	public OrientDBNoTrx(OrientGraphFactory factory) {
//		if (Database.getThreadLocalGraph() instanceof DelegatingFramedGraph) {
//			init(Database.getThreadLocalGraph());
//		} else {
			FramedGraph graph = new DelegatingFramedGraph<>(factory.getNoTx(), true, false);
			init(graph);
//		}
	}

	@Override
	public void close() {
		Database.setThreadLocalGraph(getOldGraph());
		getGraph().close();
		getGraph().shutdown();
	}
}

@@ -525,140 +525,8 @@
 ) %7B%0A
-//%09%09if (Database.getThreadLocalGraph() instanceof DelegatingFramedGraph) %7B%0A//%09%09%09init(Database.getThreadLocalGraph());%0A//%09%09%7D else %7B%0A%09
 %09%09Fr
@@ -606,17 +606,16 @@
 lse);%0A%09%09
-%09
 init(gra
@@ -623,14 +623,8 @@
 h);%0A
-//%09%09%7D%0A
 %09%7D%0A%0A

Remove bogus comment