/*
 * Decompiled with CFR 0.152.
 * 
 * Could not load the following classes:
 *  com.l7tech.gateway.common.Component
 *  org.springframework.context.ApplicationEvent
 *  org.springframework.transaction.TransactionException
 *  org.springframework.transaction.annotation.Propagation
 *  org.springframework.transaction.support.TransactionCallback
 *  org.springframework.transaction.support.TransactionTemplate
 */
package com.l7tech.server.uddi;

import com.l7tech.gateway.common.Component;
import com.l7tech.server.event.system.UDDISystemEvent;
import com.l7tech.server.uddi.UDDICoordinator;
import com.l7tech.server.uddi.UDDITaskFactory;
import com.l7tech.server.uddi.ap;
import com.l7tech.server.uddi.av;
import com.l7tech.server.uddi.aw;
import java.util.logging.Level;
import org.springframework.context.ApplicationEvent;
import org.springframework.transaction.TransactionException;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.support.TransactionCallback;
import org.springframework.transaction.support.TransactionTemplate;

class m
implements Runnable {
    final ap this$0;
    private static final String[] a;

    m(ap ap2) {
        this.this$0 = ap2;
    }

    @Override
    public void run() {
        TransactionTemplate transactionTemplate;
        UDDITaskFactory.UDDIHandledTaskException[] uDDIHandledTaskExceptionArray = new UDDITaskFactory.UDDIHandledTaskException[1];
        try {
            transactionTemplate = new TransactionTemplate(this.this$0.c.e);
            transactionTemplate.setPropagationBehavior(Propagation.REQUIRES_NEW.value());
            transactionTemplate.execute((TransactionCallback)new av(this, uDDIHandledTaskExceptionArray));
        }
        catch (TransactionException transactionException) {
            String[] stringArray = a;
            UDDICoordinator.a.log(Level.WARNING, stringArray[0], transactionException);
        }
        if (uDDIHandledTaskExceptionArray[0] != null) {
            try {
                transactionTemplate = new TransactionTemplate(this.this$0.c.e);
                transactionTemplate.setPropagationBehavior(Propagation.REQUIRES_NEW.value());
                transactionTemplate.execute((TransactionCallback)new aw(this, uDDIHandledTaskExceptionArray));
            }
            catch (TransactionException transactionException) {
                UDDICoordinator.a.log(Level.WARNING, a[1], transactionException);
            }
        }
        transactionTemplate = this.this$0.c.s;
        try {
            if (transactionTemplate != null) {
                transactionTemplate.publishEvent((ApplicationEvent)new UDDISystemEvent(this.this$0.c, Component.GW_UDDI_SERVICE, UDDISystemEvent.Action.REGISTRY_UPDATE));
            }
        }
        catch (TransactionException transactionException) {
            throw m.a(transactionException);
        }
    }

    private static TransactionException a(TransactionException transactionException) {
        return transactionException;
    }

    /*
     * Enabled aggressive block sorting
     */
    static {
        String[] stringArray = new String[2];
        int n2 = 0;
        String string = "\f=\\\u0018<\u0014\u0016; M\u0012=G\u000f'(\u000e\u0003<U\b:.M\u0003'[\bi)A\u0005na\"\r\u0006\u000e\u00128Q\b=a.\f=\\\u0018<\u0014\u000e(!J\u001b'Z\u0001i*V\u0014+D\u0012  @W-U\u0013:*JW,MF\u001c\u000bj>nQ\u0010,!ZY";
        int n3 = "\f=\\\u0018<\u0014\u0016; M\u0012=G\u000f'(\u000e\u0003<U\b:.M\u0003'[\bi)A\u0005na\"\r\u0006\u000e\u00128Q\b=a.\f=\\\u0018<\u0014\u000e(!J\u001b'Z\u0001i*V\u0014+D\u0012  @W-U\u0013:*JW,MF\u001c\u000bj>nQ\u0010,!ZY".length();
        int n4 = 44;
        int n5 = -1;
        while (true) {
            int n6 = ++n5;
            stringArray[n2++] = m.a(22, m.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] ^ 0x70);
        }
        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 -> 95;
                    case 1 -> 89;
                    case 2 -> 56;
                    case 3 -> 97;
                    case 4 -> 88;
                    case 5 -> 34;
                    default -> 112;
                })));
                ++n3;
                n4 = n4;
            } while (n4 > n3);
        }
        return new String(cArray2).intern();
    }
}

