/*
 * Decompiled with CFR 0.152.
 * 
 * Could not load the following classes:
 *  com.l7tech.gateway.common.audit.Audit
 */
package com.l7tech.server.util.res;

import com.l7tech.gateway.common.audit.Audit;
import com.l7tech.server.url.UrlResolver;
import com.l7tech.server.util.res.ResourceGetter;
import java.io.IOException;
import java.text.ParseException;

abstract class c<R, M>
extends ResourceGetter<R, M> {
    private final UrlResolver<R> a;
    private static final String g = c.b(122, c.c("67I>m3o\u0012ds\u0000WvoW~oLSvl\u0002~n\tE="));

    protected c(UrlResolver<R> urlResolver, Audit audit) {
        super(audit);
        if (urlResolver == null) {
            throw new NullPointerException(g);
        }
        this.a = urlResolver;
    }

    protected R fetchObject(String string) throws IOException, ParseException {
        return this.a.resolveUrl(this.audit, string);
    }

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

    /*
     * Handled impossible loop by duplicating code
     * Enabled aggressive block sorting
     */
    private static String b(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 -> 13;
                    case 1 -> 109;
                    case 2 -> 102;
                    case 3 -> 22;
                    case 4 -> 91;
                    case 5 -> 105;
                    default -> 103;
                })));
                ++n3;
                n4 = n4;
            } while (n4 > n3);
        }
        return new String(cArray2).intern();
    }
}

