/*
 * Decompiled with CFR 0.152.
 * 
 * Could not load the following classes:
 *  com.l7tech.util.ExceptionUtils
 */
package com.l7tech.server.jdbc;

import com.l7tech.server.jdbc.JdbcQueryingManagerImpl;
import com.l7tech.server.jdbc.l;
import com.l7tech.server.jdbc.v;
import com.l7tech.util.ExceptionUtils;
import java.sql.SQLException;
import java.util.concurrent.Callable;
import javax.naming.NamingException;
import javax.sql.DataSource;

class o
implements Callable<Void> {
    final String val$connectionName;
    final l val$key;
    final v this$1;
    private static final String[] a;

    /*
     * Ignored method signature, as it can't be verified against descriptor
     */
    o(v v2, String string, l l2) {
        this.this$1 = v2;
        this.val$connectionName = string;
        this.val$key = l2;
    }

    /*
     * WARNING - Removed try catching itself - possible behaviour change.
     */
    @Override
    public Void call() throws Exception {
        try {
            DataSource dataSource = this.this$1.c.getDataSource(this.val$connectionName);
            String[] stringArray = a;
            int n2 = this.this$1.this$0.d.getIntProperty(stringArray[1], 120);
            Long l2 = null;
            if (this.this$1.this$0.j.containsKey(this.val$key)) {
                l2 = this.this$1.this$0.j.get((Object)this.val$key).c.get();
            }
            String string = this.val$key.toString().intern();
            synchronized (string) {
                this.this$1.this$0.a(this.val$connectionName, this.val$key.d, this.this$1.this$0.a(dataSource, 0, n2), this.val$key.c, l2);
            }
        }
        catch (SQLException | NamingException exception) {
            String[] stringArray = a;
            JdbcQueryingManagerImpl.a.warning(stringArray[0] + this.val$connectionName + stringArray[2] + ExceptionUtils.getMessage((Throwable)exception));
        }
        return null;
    }

    /*
     * Enabled aggressive block sorting
     */
    static {
        String[] stringArray = new String[3];
        int n2 = 0;
        String string = "h\u007f\u0014s{0\u001eVZvT:)\u001a\u0002_9G51\u0014C_vD:.\u0010\u0002\u0001vs4(\u0017F\u001b8_/}\u001cGOvT:)\u001a\u0002H9E)>\u001e\u0002]9B{>\u0014LU3S/4\u0014L\u0001v\u0017*H_4S\n(\u001ePB\u001bQ5<\u001cGIxS:>\u0013Go7C0\u000e\u000fCO3]>3\u000fvR;U4(\u000f\n\u0005\u001b2E>}\u000fM\u0001v";
        int n3 = "h\u007f\u0014s{0\u001eVZvT:)\u001a\u0002_9G51\u0014C_vD:.\u0010\u0002\u0001vs4(\u0017F\u001b8_/}\u001cGOvT:)\u001a\u0002H9E)>\u001e\u0002]9B{>\u0014LU3S/4\u0014L\u0001v\u0017*H_4S\n(\u001ePB\u001bQ5<\u001cGIxS:>\u0013Go7C0\u000e\u000fCO3]>3\u000fvR;U4(\u000f\n\u0005\u001b2E>}\u000fM\u0001v".length();
        int n4 = 74;
        int n5 = -1;
        while (true) {
            int n6 = ++n5;
            stringArray[n2++] = o.a(94, o.a(string.substring(n6, n6 + n4)));
            if ((n5 += n4) >= n3) {
                a = stringArray;
                return;
            }
            n4 = string.charAt(n5);
        }
    }

    private static char[] a(String string) {
        char[] cArray = string.toCharArray();
        if (cArray.length < 2) {
            cArray = cArray;
            cArray[0] = (char)(cArray[0] ^ 0x25);
        }
        return cArray;
    }

    /*
     * Handled impossible loop by duplicating code
     * Enabled aggressive block sorting
     */
    private static String a(int n2, char[] cArray) {
        char[] cArray2;
        block11: {
            int n3;
            int n4;
            int n5;
            block10: {
                n5 = n2;
                cArray2 = cArray;
                n4 = cArray.length;
                n3 = 0;
                if (!true) break block10;
                n4 = n4;
                if (n4 <= n3) break block11;
            }
            do {
                n5 = n5;
                cArray2 = cArray2;
                int n6 = n3;
                cArray2[n6] = (char)(cArray2[n6] ^ (n5 ^ (switch (n3 % 7) {
                    case 0 -> 124;
                    case 1 -> 101;
                    case 2 -> 8;
                    case 3 -> 110;
                    case 4 -> 5;
                    case 5 -> 3;
                    default -> 37;
                })));
                ++n3;
                n4 = n4;
            } while (n4 > n3);
        }
        return new String(cArray2).intern();
    }
}

