/*
 * Decompiled with CFR 0.152.
 * 
 * Could not load the following classes:
 *  com.l7tech.gateway.common.audit.AuditDetailMessage
 *  com.l7tech.gateway.common.audit.SystemMessages
 *  com.l7tech.util.Functions$Unary
 *  com.l7tech.util.Pair
 */
package com.l7tech.server;

import com.l7tech.gateway.common.audit.AuditDetailMessage;
import com.l7tech.gateway.common.audit.SystemMessages;
import com.l7tech.server.SimplePropertyChangeHandler;
import com.l7tech.server.a3;
import com.l7tech.util.Functions;
import com.l7tech.util.Pair;
import java.util.regex.Pattern;

class a2
implements Functions.Unary<Pair<String, Pattern>, String> {
    final SimplePropertyChangeHandler this$0;

    a2(SimplePropertyChangeHandler simplePropertyChangeHandler) {
        this.this$0 = simplePropertyChangeHandler;
    }

    public Pair<String, Pattern> call(String string) {
        String[] stringArray = this.this$0.f.split(string);
        if (stringArray.length == 2) {
            Pattern pattern;
            String string2 = stringArray[0].trim();
            boolean bl2 = this.this$0.a(string2, false, new a3(this, string2));
            try {
                if (!bl2) {
                    return null;
                }
            }
            catch (Exception exception) {
                throw a2.a(exception);
            }
            try {
                pattern = Pattern.compile(stringArray[1].trim());
            }
            catch (Exception exception) {
                this.this$0.g.logAndAudit((AuditDetailMessage)SystemMessages.INVALID_AUTO_DATE_FORMAT, new String[]{string2});
                return null;
            }
            return new Pair((Object)string2, (Object)pattern);
        }
        this.this$0.g.logAndAudit((AuditDetailMessage)SystemMessages.INVALID_AUTO_DATE_FORMAT, new String[]{string});
        return null;
    }

    private static Exception a(Exception exception) {
        return exception;
    }
}

