/*
 * Decompiled with CFR 0.152.
 * 
 * Could not load the following classes:
 *  com.l7tech.policy.Policy
 *  com.l7tech.policy.assertion.Assertion
 *  com.l7tech.policy.assertion.PolicyAssertionException
 */
package com.l7tech.server.policy;

import com.l7tech.policy.Policy;
import com.l7tech.policy.assertion.Assertion;
import com.l7tech.policy.assertion.PolicyAssertionException;
import com.l7tech.server.policy.PolicyService;
import com.l7tech.server.policy.ac;

class ad
implements PolicyService.ServiceInfo {
    private Assertion a;
    final Assertion val$servicePolicy;
    final String val$servicePolicyVersion;
    final ac this$1;

    /*
     * Ignored method signature, as it can't be verified against descriptor
     */
    ad(ac ac2, Assertion assertion, String string) {
        this.this$1 = ac2;
        this.val$servicePolicy = assertion;
        this.val$servicePolicyVersion = string;
        this.a = this.this$1.val$inlineIncludes ? null : Policy.simplify((Assertion)this.val$servicePolicy, (boolean)this.this$1.val$includeComments);
    }

    /*
     * Enabled aggressive block sorting
     * Enabled unnecessary exception pruning
     * Enabled aggressive exception aggregation
     */
    @Override
    public synchronized Assertion getPolicy() throws PolicyAssertionException {
        try {
            if (this.a != null) return this.a;
            try {
                this.a = Policy.simplify((Assertion)this.this$1.this$0.policyPathBuilder.inlineIncludes(this.val$servicePolicy, null, false), (boolean)this.this$1.val$includeComments);
                return this.a;
            }
            catch (InterruptedException interruptedException) {
                throw new RuntimeException(interruptedException);
            }
        }
        catch (PolicyAssertionException policyAssertionException) {
            throw ad.a(policyAssertionException);
        }
    }

    @Override
    public String getVersion() {
        return this.val$servicePolicyVersion;
    }

    private static PolicyAssertionException a(PolicyAssertionException policyAssertionException) {
        return policyAssertionException;
    }
}

