/*
 * Decompiled with CFR 0.152.
 */
package com.l7tech.server.jdbc;

import com.l7tech.server.jdbc.JdbcAdminImpl;
import java.util.ArrayList;
import java.util.concurrent.Callable;
import javax.security.auth.Subject;

class h
implements Callable<String> {
    final String val$connectionName;
    final String val$query;
    final String val$schemaName;
    final int val$queryTimeout;
    final JdbcAdminImpl this$0;

    /*
     * Ignored method signature, as it can't be verified against descriptor
     */
    h(JdbcAdminImpl jdbcAdminImpl, String string, String string2, String string3, int n2) {
        this.this$0 = jdbcAdminImpl;
        this.val$connectionName = string;
        this.val$query = string2;
        this.val$schemaName = string3;
        this.val$queryTimeout = n2;
    }

    @Override
    public String call() throws Exception {
        Callable<String> callable = () -> this.lambda$call$0(this.val$connectionName, this.val$query, this.val$schemaName, this.val$queryTimeout);
        try {
            if (this.this$0.a(this.this$0.e.getJdbcConnection(this.val$connectionName))) {
                return Subject.callAs(null, callable);
            }
        }
        catch (Exception exception) {
            throw h.a(exception);
        }
        return callable.call();
    }

    private String lambda$call$0(String string, String string2, String string3, int n2) throws Exception {
        String string4;
        Object object = this.this$0.f.performJdbcQuery(string, string2, string3, 1, n2, new ArrayList<Object>());
        try {
            string4 = object instanceof String ? (String)object : null;
        }
        catch (Exception exception) {
            throw h.a(exception);
        }
        return string4;
    }

    private static Exception a(Exception exception) {
        return exception;
    }
}

