private static Object[] NO_ARGS = new Object[] { Tuple0.INSTANCE };
-- public static <T> void asyncRead(final Function f) throws DatabaseException {
++ public static <T> void asyncRead(final Function f) throws DatabaseException {
asyncRead(f, NO_ARGS);
}
SCLContext.push(context);
context.put(GRAPH, graph);
try {
-- f.apply(Tuple0.INSTANCE);
++ f.applyArray(args);
} finally {
SCLContext.pop();
}
SCLContext.push(context);
ReadGraph oldGraph = (ReadGraph)context.put(GRAPH, graph);
try {
-- return (T)f.apply(Tuple0.INSTANCE);
++ return (T)f.applyArray(args);
} finally {
context.put(GRAPH, oldGraph);
SCLContext.pop();
SCLContext.push(context);
context.put(GRAPH, graph);
try {
-- f.apply(args);
++ f.applyArray(args);
} finally {
SCLContext.pop();
}
final SCLContext context = SCLContext.getCurrent();
Object graph = context.get(GRAPH);
if (graph != null && graph instanceof WriteGraph) {
-- return (T)f.apply(Tuple0.INSTANCE);
++ return (T)f.applyArray(args);
} else {
if (graph != null) {
LOGGER.error(
SCLReportingHandler oldPrinter = (SCLReportingHandler)context.put(SCLReportingHandler.REPORTING_HANDLER, printer);
ReadGraph oldGraph = (ReadGraph)context.put(GRAPH, graph);
try {
-- return (T)f.apply(args);
++ return (T)f.applyArray(args);
} finally {
context.put(GRAPH, oldGraph);
context.put(SCLReportingHandler.REPORTING_HANDLER, oldPrinter);