/*
 * Decompiled with CFR 0.152.
 * 
 * Could not load the following classes:
 *  com.l7tech.gateway.common.solutionkit.SolutionKit
 *  com.l7tech.objectmodel.FindException
 *  com.l7tech.util.ExceptionUtils
 *  org.springframework.context.ApplicationEvent
 *  org.springframework.context.ApplicationListener
 */
package com.l7tech.server.solutionkit;

import com.l7tech.gateway.common.solutionkit.SolutionKit;
import com.l7tech.objectmodel.FindException;
import com.l7tech.server.event.EntityInvalidationEvent;
import com.l7tech.server.solutionkit.SolutionKitManagerImpl;
import com.l7tech.util.ExceptionUtils;
import java.util.logging.Level;
import org.springframework.context.ApplicationEvent;
import org.springframework.context.ApplicationListener;

class g
implements ApplicationListener {
    final SolutionKitManagerImpl this$0;
    private static final String a = g.a(83, g.a("EBxU\b\u00119dC9B\u0014\u0010xdI9g\u0016\u001bmuOmR\u00001wdEmN0\u0006xsG|E^T"));

    g(SolutionKitManagerImpl solutionKitManagerImpl) {
        this.this$0 = solutionKitManagerImpl;
    }

    public void onApplicationEvent(ApplicationEvent applicationEvent) {
        EntityInvalidationEvent entityInvalidationEvent;
        if (applicationEvent instanceof EntityInvalidationEvent && SolutionKit.class.equals((entityInvalidationEvent = (EntityInvalidationEvent)applicationEvent).getEntityClass())) {
            try {
                this.this$0.a();
            }
            catch (FindException findException) {
                SolutionKitManagerImpl.m.log(Level.WARNING, a + ExceptionUtils.getMessage((Throwable)findException), ExceptionUtils.getDebugException((Throwable)findException));
            }
        }
    }

    private static char[] a(String string) {
        char[] cArray = string.toCharArray();
        if (cArray.length < 2) {
            cArray = cArray;
            cArray[0] = (char)(cArray[0] ^ 0x4A);
        }
        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 -> 67;
                    case 1 -> 127;
                    case 2 -> 74;
                    case 3 -> 100;
                    case 4 -> 55;
                    case 5 -> 39;
                    default -> 74;
                })));
                ++n3;
                n4 = n4;
            } while (n4 > n3);
        }
        return new String(cArray2).intern();
    }
}

