package com.google.gson.internal;

import com.bytedance.covode.number.Covode;

public final class d {
    public static final int LIZ;

    public static boolean LIZ() {
        if (LIZ >= 9) {
            return true;
        }
        return false;
    }

    static {
        Covode.recordClassIndex(45488);
        String property = System.getProperty("java.version");
        int LIZ2 = LIZ(property);
        if (LIZ2 == -1) {
            LIZ2 = LIZIZ(property);
        }
        if (LIZ2 == -1) {
            LIZ2 = 6;
        }
        LIZ = LIZ2;
    }

    public static int LIZ(String str) {
        try {
            String[] split = str.split("[._]");
            int parseInt = Integer.parseInt(split[0]);
            if (parseInt != 1 || split.length <= 1) {
                return parseInt;
            }
            return Integer.parseInt(split[1]);
        } catch (NumberFormatException unused) {
            return -1;
        }
    }

    public static int LIZIZ(String str) {
        try {
            StringBuilder sb = new StringBuilder();
            for (int i = 0; i < str.length(); i++) {
                char charAt = str.charAt(i);
                if (!Character.isDigit(charAt)) {
                    break;
                }
                sb.append(charAt);
            }
            return Integer.parseInt(sb.toString());
        } catch (NumberFormatException unused) {
            return -1;
        }
    }
}
